`resetPasswordRequest` event is never emitted as callback is called prematurely

This commit is contained in:
Gaurav Ramanan 2019-02-28 20:16:23 +05:30 committed by GitHub
parent c8a31e2725
commit 51b32d7672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}
});