On Thursday, Aug 14, 2003, at 04:25 US/Eastern, ijsman wrote:
I'm using this code to try and get a user's password. from AccessControl import getSecurityManager request = context.REQUEST user = getSecurityManager().getUser() curpas = user._getPassword() but this gives me an error because i can't run a method that has a '_' in it's name. How do i then get a user's password? It would be nice to be able to mail people's password if they forget it :)
If the goal is to send a password that the user has forgotten then this code will not work at all because it looks at the user that is currently logged in. If I forget my password then I can't be logged in at that moment. Take a look at how the CMF implements this, especially the mailPassword method on the registration tool: http://cvs.zope.org/CMF/CMFDefault/ RegistrationTool.py?rev=1.20&content-type=text/vnd.viewcvs-markup jens