Skip to content

Commit

Permalink
Removes lock and resets login attempts when a password is reset.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmueller committed Aug 8, 2016
1 parent 3dc9c9a commit bc1d33a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ exports.resetPassword = {
user.password = req.body.password;
user.passwordResetToken = undefined;
user.passwordResetExpires = undefined;
user.loginAttempts = 0;
user.lockUntil = undefined;

user.save(function(err) {
if (err) {
Expand Down

0 comments on commit bc1d33a

Please sign in to comment.