diff --git a/product/ERP5/Tool/PasswordTool.py b/product/ERP5/Tool/PasswordTool.py index 36f514aff6131623b9f98cf338507a6f9291c0a2..058664c924368c5c00eef873442e89580a3728f8 100644 --- a/product/ERP5/Tool/PasswordTool.py +++ b/product/ERP5/Tool/PasswordTool.py @@ -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.")