`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) {
|
if (err) {
|
||||||
return cb(err);
|
return cb(err);
|
||||||
}
|
}
|
||||||
cb();
|
|
||||||
UserModel.emit('resetPasswordRequest', {
|
UserModel.emit('resetPasswordRequest', {
|
||||||
email: options.email,
|
email: options.email,
|
||||||
accessToken: accessToken,
|
accessToken: accessToken,
|
||||||
user: user,
|
user: user,
|
||||||
options: options,
|
options: options,
|
||||||
});
|
});
|
||||||
|
cb();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue