Merge pull request #252 from haio/master

Fix bug in User#resetPassword
This commit is contained in:
Raymond Feng 2014-05-13 13:10:42 -07:00
commit 999ac64869
1 changed files with 3 additions and 2 deletions

View File

@ -379,7 +379,7 @@ User.resetPassword = function(options, cb) {
options = options || {};
if(typeof options.email === 'string') {
UserModel.findOne({email: options.email}, function(err, user) {
UserModel.findOne({ where: {email: options.email} }, function(err, user) {
if(err) {
cb(err);
} else if(user) {
@ -392,7 +392,8 @@ User.resetPassword = function(options, cb) {
cb();
UserModel.emit('resetPasswordRequest', {
email: options.email,
accessToken: accessToken
accessToken: accessToken,
user: user
});
}
})