ac613d7a12bd6dbd92c602b2f68241842994b7c1
1 ##parameters=password, confirm, domains=None, ajax=''
2 from ZTUtils
import make_query
as mq
3 url
= context
.portal_url()
4 red
= context
.REQUEST
.RESPONSE
.redirect
6 mt
= context
.portal_membership
7 failMessage
=context
.portal_registration
.testPasswordValidity(password
, confirm
)
9 return red('%s/password_form?%s' % (url
, mq(portal_status_message
=failMessage
, ajax
=ajax
)))
11 member
= mt
.getAuthenticatedMember()
12 mt
.setPassword(password
, domains
)
13 mt
.credentialsChanged(password
)
14 return red('%s/personalize_form?%s' % (url
, mq(portal_status_message
='Password changed.', ajax
=ajax
)))