Commit 05c8dbdb authored by Rafael Monnerat's avatar Rafael Monnerat

PasswordTool: Ignore entries which don't come from ERP5LoginUserManager

  The user can be present from diferent logins, password tool only works with ERP5LoginUserMager
  users.
parent c9d24c01
......@@ -296,10 +296,10 @@ class PasswordTool(BaseTool):
return error("Date has expire.")
del self._password_request_dict[password_key]
portal = self.getPortalObject()
user_dict, = portal.acl_users.searchUsers(
user_dict, = [x for x in portal.acl_users.searchUsers(
login=register_user_login,
exact_match=True,
)
exact_match=True,) if 'login_list' in x]
login_dict, = user_dict['login_list']
login = portal.unrestrictedTraverse(login_dict['path'])
login.checkPasswordValueAcceptable(password) # this will raise if password does not match policy
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment