v1.18.x
Julian Lam 7 years ago
parent 002cde1057
commit be0ef799ee

@ -115,6 +115,7 @@ SocketUser.reset.commit = function (socket, data, callback) {
async.parallel({ async.parallel({
uid: async.apply(db.getObjectField, 'reset:uid', data.code), uid: async.apply(db.getObjectField, 'reset:uid', data.code),
reset: async.apply(user.reset.commit, data.code, data.password), reset: async.apply(user.reset.commit, data.code, data.password),
hook: async.apply(plugins.fireHook, 'action:password.reset', { uid: socket.uid }),
}, next); }, next);
}, },
function (results, next) { function (results, next) {

@ -339,6 +339,7 @@ module.exports = function (User) {
}), }),
async.apply(User.reset.updateExpiry, data.uid), async.apply(User.reset.updateExpiry, data.uid),
async.apply(User.auth.revokeAllSessions, data.uid), async.apply(User.auth.revokeAllSessions, data.uid),
async.apply(plugins.fireHook, 'action:password.change', { uid: uid }),
], function (err) { ], function (err) {
next(err); next(err);
}); });

Loading…
Cancel
Save