c9ffe4979e96db45849d6d241ef76d863a4c9599
1 ##parameters=username, password='', confirm='', ajax=''
3 from ZTUtils
import make_query
as mq
4 portal_url
= context
.portal_url()
5 rtool
= context
.portal_registration
8 member
= context
.portal_membership
.getMemberById(username
)
10 failMessage
= rtool
.testPropertiesValidity(req
, member
)
12 return resp
.redirect(portal_url
+ '/portal_members?%s' % mq(portal_status_message
=failMessage
,
14 macroName
='member_properties_form',
17 member
.setMemberProperties(req
.form
)
20 failMessage
= rtool
.testPasswordValidity(password
, confirm
=confirm
)
22 return resp
.redirect(portal_url
+ '/portal_members?%s' % mq(portal_status_message
=failMessage
,
24 macroName
='member_properties_form',
27 member
.setMemberPassword(password
)
29 return resp
.redirect(portal_url
+ '/portal_members?%s' % mq(portal_status_message
='Member modified.', ajax
=ajax
))