Commit 64df0d56 authored by Yusei Tahara's avatar Yusei Tahara

Use _setPasswordByForce method to change password.

Make sure that entered password is not empty.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26769 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66ee1d93
......@@ -184,6 +184,8 @@ class PasswordTool(BaseTool):
msg = translateString("Bad login provided.")
elif current_date > expiration_date:
msg = translateString("Date has expire.")
elif not password:
msg = translateSTring("Password must be entered.")
elif password != password_confirmation:
msg = translateString("Passwords do not match.")
if msg is not None:
......@@ -198,7 +200,7 @@ class PasswordTool(BaseTool):
self.password_request_dict.pop(password_key)
persons = self.acl_users.erp5_users.getUserByLogin(user_login)
person = persons[0]
person._setPassword(password)
person._setPasswordByForce(password)
person.reindexObject()
if REQUEST is not None:
msg = translateString("Password changed.")
......
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