@ -115,6 +115,7 @@ SocketUser.reset.commit = function (socket, data, callback) {
async.parallel({
uid: async.apply(db.getObjectField, 'reset:uid', data.code),
reset: async.apply(user.reset.commit, data.code, data.password),
hook: async.apply(plugins.fireHook, 'action:password.reset', { uid: socket.uid }),
}, next);
},
function (results, next) {
@ -339,6 +339,7 @@ module.exports = function (User) {
}),
async.apply(User.reset.updateExpiry, data.uid),
async.apply(User.auth.revokeAllSessions, data.uid),
async.apply(plugins.fireHook, 'action:password.change', { uid: uid }),
], function (err) {
next(err);
});