mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
closes #6592
This commit is contained in:
@@ -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);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user