Reset the number of invalid login attempts when the user change's their password

This commit is contained in:
Joseph Schorr 2015-02-23 13:56:42 -05:00
parent 10e2eabb1c
commit 4020cc1102

View file

@ -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()