[gen] Bugfix: attribute Field.focus and UserWrapper password management.

This commit is contained in:
Gaetan Delannay 2012-06-02 20:55:25 +02:00
parent 77331cd216
commit 2710fb6c39
3 changed files with 8 additions and 4 deletions

View file

@ -110,8 +110,9 @@ class UserWrapper(AbstractWrapper):
zopeUser.roles = self.roles
# Update the password if the user has entered new ones.
rq = self.request
if rq.has_key('password1'): self.setPassword(rq['password1'])
self.password1 = self.password2 = ''
if rq.has_key('password1'):
self.setPassword(rq['password1'])
self.password1 = self.password2 = ''
# "self" must be owned by its Zope user.
if 'Owner' not in self.o.get_local_roles_for_userid(login):
self.o.manage_addLocalRoles(login, ('Owner',))