`resetPasswordRequest` event is never emitted as callback is called prematurely
This commit is contained in:
parent
c8a31e2725
commit
51b32d7672
|
@ -992,13 +992,13 @@ module.exports = function(User) {
|
|||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
cb();
|
||||
UserModel.emit('resetPasswordRequest', {
|
||||
email: options.email,
|
||||
accessToken: accessToken,
|
||||
user: user,
|
||||
options: options,
|
||||
});
|
||||
cb();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue