revoke all sessions on email change

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

@ -200,6 +200,7 @@ module.exports = function (User) {
async.series([
async.apply(db.sortedSetRemove, 'email:uid', oldEmail.toLowerCase()),
async.apply(db.sortedSetRemove, 'email:sorted', oldEmail.toLowerCase() + ':' + uid),
async.apply(User.auth.revokeAllSessions, uid),
], function (err) {
next(err);
});

Loading…
Cancel
Save