[CMF-checkins] CVS: CMF/CMFDefault/skins/control - personalize.py:1.5
Florent Guillaume
fg@nuxeo.com
Sat, 29 Jun 2002 11:02:26 -0400
Update of /cvs-repository/CMF/CMFDefault/skins/control
In directory cvs.zope.org:/tmp/cvs-serv4660/CMFDefault/skins/control
Modified Files:
personalize.py
Log Message:
Fixed CMFDefault.RegistrationTool to correctly check the lack of 'email'
property when creating a new member or when checking member's properties
validity (Tracker #508).
The fix ensures that the 'email' property is filled in at Join time, and
that a user is not allowed to clear his email (the policy in CMFDefault
seems to be that all members have an email).
I keep the possibility of a user leaving an already-empty password blank
when changing his preferences (for instance if it was removed by the
administrator for some reason, the user can still go change his other
properties).
=== CMF/CMFDefault/skins/control/personalize.py 1.4 => 1.5 ===
REQUEST=context.REQUEST
member = context.portal_membership.getAuthenticatedMember()
+
+failMessage = context.portal_registration.testPropertiesValidity(REQUEST,
+ member)
+if failMessage:
+ REQUEST.set('portal_status_message', failMessage)
+ return context.personalize_form(context, REQUEST,
+ portal_status_message=failMessage)
+
member.setProperties(REQUEST)
if REQUEST.has_key('portal_skin'):
context.portal_skins.updateSkinCookie()
-
+
qs = '/personalize_form?portal_status_message=Member+changed.'
context.REQUEST.RESPONSE.redirect(context.portal_url() + qs)