Back to index

plone3  3.1.7
personalize.py
Go to the documentation of this file.
00001 ## Script (Python) "personalize"
00002 ##title=Personalization Handler.
00003 ##parameters=
00004 REQUEST=context.REQUEST
00005 member = context.portal_membership.getAuthenticatedMember()
00006 
00007 failMessage = context.portal_registration.testPropertiesValidity(REQUEST,
00008                                                                  member)
00009 if failMessage:
00010     REQUEST.set('portal_status_message', failMessage)
00011     return context.personalize_form(context, REQUEST,
00012                                     portal_status_message=failMessage)
00013 
00014 member.setProperties(REQUEST)
00015 
00016 if REQUEST.has_key('portal_skin'):
00017     context.portal_skins.updateSkinCookie()
00018 
00019 qs = '/personalize_form?portal_status_message=Member+changed.'
00020 
00021 context.REQUEST.RESPONSE.redirect(context.portal_url() + qs)