[Zope] User changing their own password via External Method with Cookie Crumbler

Dave Cinege dcinege-mlists-dated-1112642935.5f1cc2 at psychosis.com
Wed Mar 30 14:28:45 EST 2005


On Wednesday 30 March 2005 12:00, zope-request at zope.org wrote:
> Dave Cinege wrote:
> > Does anyone have a working example code snippet?
>
> Have a look at the CMF source code, find the bit that allows users to
> change their own passwords...

Thanks. I was hoping it wouldn't come to that...

From what I was able to dissect from CMF changing the password is down to a 
hack.  : P   userFolderEditUser() doesn't work. You must instead change the 
'__' attribute of a user object. : O   My code below works, except that 
credentialsChanged() ends up redirecting to the login page vs, resetting the 
cookie and allowing the user to continue. Is that expected?

def UserEditFunc (self):
    reqd = dict(self.REQUEST)
    user = self.acl_users.getUser(reqd['username'])
    user.__ = reqd['password']
    self.login.credentialsChanged(user,reqd['username'],reqd['password'])



More information about the Zope mailing list