Hi, another question that zope.org could not answer: How can I implement a own interface to change the user password? (Standard Zope acl user) Eddy
Eddy Ilg wrote:
another question that zope.org could not answer: How can I implement a own interface to change the user password? (Standard Zope acl user)
In the standard user folder, the password is stored as an attribute __ (that's two underscores) on the user object. Look up the user and set that. This has to be done with file-system code. The existing password-setting things should provide an example. Other things set passwords as well: see, for example, the PasswordResetTool in the Collective. --jcc
Hi,
another question that zope.org could not answer: How can I implement a own interface to change the user password? (Standard Zope acl user)
This is my Script "change_password": Parameter List: new_password, new_password_confirm import AccessControl if (new_password == new_password_confirm): user = AccessControl.getSecurityManager().getUser() if (user): uid = user.getId() myreq={} myreq['name'] = uid myreq['roles'] = user.getRoles() myreq['domains'] = user.getDomains() myreq['password'] = new_password myreq['confirm'] = new_password_confirm context.acl_users.manage_users(submit='Change', REQUEST=myreq) return context.REQUEST.RESPONSE.redirect ("content.html") Call it like that: <form method="POST" action="change_password" target="Inhalt"> New Password: <input type="password" name="new_password"><br> Confirm Password: <input type="password" name="new_password_confirm"><br> <input type="submit" value="Change Password"> </form> I don't know if it's necessary to set a Proxy-Role or change Security. Ciao, Patrick
participants (3)
-
Eddy Ilg -
J Cameron Cooper -
Patrick Ulmer