[Zope] change user password

Marinussen, M.J. (Ria) M.J.Marinussen at ewi.utwente.nl
Mon Nov 1 03:49:40 EST 2004

Hi Eddy,

I  had a similar question a while ago, and with some help from this list
I managed to produce a pythonscript to do this very thing.
People who are logged on can change their own password with it.
You need a form in which they can type the new password (and confirm
Processing can be done with this script:

# Parameter List: new_password, new_password_confirm ==== # get name,
roles and domain from currently logged on user user =
_.SecurityGetUser() name = user.getUserName() roles = user.getRoles()
domains = user.getDomains()

# Test whether the user of this script is logged on # if user is not
logged in, do nothing, else change password.
if name == "Anonymous User":
 # get userfolder
 userfolder = getattr(context, 'acl_users')  # take password and
confirmation from password and info from logged on user and put in
dictionary  user_info = { 'name' : name,
               'password' : new_password,
               'confirm' : new_password_confirm,
               'roles' : roles,
               'domains' : domains
 userfolder.manage_users(submit='Change', REQUEST=user_info)



Good luck with it!

Ria Marinussen
Faculty EEMCS,
Department of Computer Science,
University of Twente 

Email: ria.marinussen at cs.utwente.nl

> Message: 10
> Date: Fri, 29 Oct 2004 21:29:25 +0200
> From: Eddy Ilg <eddy at fericom.net>
> Subject: [Zope] change user password
> To: zope at zope.org
> Message-ID: <41829A15.7090209 at fericom.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 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

More information about the Zope mailing list