[CMF-checkins] CVS: Products/CMFDefault/skins/control - change_password.py:1.2 personalize.py:1.3
Andrew Sawyers
andrew@zope.com
Mon, 18 Mar 2002 10:27:51 -0500
Update of /cvs-repository/Products/CMFDefault/skins/control
In directory cvs.zope.org:/tmp/cvs-serv32652/CMFDefault/skins/control
Modified Files:
change_password.py personalize.py
Log Message:
*Moved site policies around out from the Registration Tool.
* setProperties moved to MemberDataTool
* setPassword moved to MembershipTool
* Skins and python scripts updated to support these changes...
=== Products/CMFDefault/skins/control/change_password.py 1.1 => 1.2 ===
##title=Action to change password
##parameters=password, confirm, domains=None
-
+mt = context.portal_membership
failMessage=context.portal_registration.testPasswordValidity(password, confirm)
if failMessage:
return context.password_form(context,
context.REQUEST,
error=failMessage)
-
-context.portal_registration.setPassword(password, domains)
-context.portal_membership.credentialsChanged(password)
+member = mt.getAuthenticatedMember()
+mt.setPassword(password, domains)
+mt.credentialsChanged(password)
return context.personalize_form(context,
context.REQUEST,
portal_status_message='Password changed.')
=== Products/CMFDefault/skins/control/personalize.py 1.2 => 1.3 ===
##parameters=
REQUEST=context.REQUEST
-context.portal_registration.setProperties(REQUEST)
+member = context.portal_membership.getAuthenticatedMember()
+member.setProperties(REQUEST)
if REQUEST.has_key('portal_skin'):
context.portal_skins.updateSkinCookie()