commit
999ac64869
|
@ -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
|
||||
});
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue