Reset the number of invalid login attempts when the user change's their password
This commit is contained in:
parent
10e2eabb1c
commit
4020cc1102
1 changed files with 1 additions and 0 deletions
|
@ -905,6 +905,7 @@ def change_password(user, new_password):
|
|||
raise InvalidPasswordException(INVALID_PASSWORD_MESSAGE)
|
||||
|
||||
pw_hash = hash_password(new_password)
|
||||
user.invalid_login_attempts = 0
|
||||
user.password_hash = pw_hash
|
||||
user.save()
|
||||
|
||||
|
|
Reference in a new issue