From be0ef799ee161db427293ef15daa875d05283780 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 29 Jun 2018 14:16:28 -0400 Subject: [PATCH] closes #6592 --- src/socket.io/user.js | 1 + src/user/profile.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/socket.io/user.js b/src/socket.io/user.js index 071cb6a5f7..2534b156b0 100644 --- a/src/socket.io/user.js +++ b/src/socket.io/user.js @@ -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) { diff --git a/src/user/profile.js b/src/user/profile.js index fc320bd5d0..5ee4fed689 100644 --- a/src/user/profile.js +++ b/src/user/profile.js @@ -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); });