From 4020cc11023a97e567430fdc2bbea6d2f0ade5f5 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 23 Feb 2015 13:56:42 -0500 Subject: [PATCH] Reset the number of invalid login attempts when the user change's their password --- data/model/legacy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/data/model/legacy.py b/data/model/legacy.py index 0ac383bed..311d566ad 100644 --- a/data/model/legacy.py +++ b/data/model/legacy.py @@ -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()