Permalink
Browse files

Merge pull request #74 from AvianFlu/master

Fixes to post-login-failure password resets
  • Loading branch information...
2 parents 15a6176 + 7128916 commit 5a3674471378b073b828f4a86342709da1091d0d @AvianFlu AvianFlu committed Aug 15, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/jitsu.js
  2. +1 −1 lib/jitsu/commands/users.js
View
@@ -214,7 +214,7 @@ jitsu.setupUserNoWarn = function(callback) {
if (err) {
return callback(err);
}
- if (/^y[es]*/i.test(res.reset)) {
+ if (/^y[es]?/i.test(res['request password reset'])) {
return jitsu.commands.run(['users', 'forgot', username], callback);
}
@@ -231,7 +231,7 @@ users.forgot = function (username, shake, callback) {
}
winston.info('Check your email for instructions on resetting your password.');
- callback();
+ callback(new Error('Password reset pending, cannot login.'));
});
};

0 comments on commit 5a36744

Please sign in to comment.