Commit 89b8e31c authored by Ivan Tyagov's avatar Ivan Tyagov

Notify password expire event and leave implementation (if any)

to respective iLoginAccountProvider implementation class.
parent b9ab4468
......@@ -188,8 +188,13 @@ class ERP5UserManager(BasePlugin):
user.notifyLoginFailure()
return None
# check if user account is blocked and if password is expired or not
if user.isLoginBlocked() or user.isPasswordExpired():
# check if password is expired
if user.isPasswordExpired():
user.notifyPasswordExpire()
return None
# check if user account is blocked
if user.isLoginBlocked():
return None
return authentication_result
......
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