From 6a4b08208090a6756fb7ec12c0e8e8d56039fcce Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 15 Mar 2017 12:19:09 +0300 Subject: [PATCH] closes #5524 --- public/src/client/account/edit/password.js | 4 ++-- src/user/profile.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/client/account/edit/password.js b/public/src/client/account/edit/password.js index e6fccf46e5..d2239b36a0 100644 --- a/public/src/client/account/edit/password.js +++ b/public/src/client/account/edit/password.js @@ -79,8 +79,8 @@ define('forum/account/edit/password', ['forum/account/header', 'translator'], fu onPasswordConfirmChanged(); return app.alertError(err.message); } - ajaxify.go('user/' + ajaxify.data.userslug); - app.alertSuccess('[[user:change_password_success]]'); + + window.location.href = config.relative_path + '/login'; }); } else { if (!passwordsmatch) { diff --git a/src/user/profile.js b/src/user/profile.js index ab7d9f9ae2..b2b3b7eb5f 100644 --- a/src/user/profile.js +++ b/src/user/profile.js @@ -272,6 +272,7 @@ module.exports = function (User) { async.parallel([ async.apply(User.setUserField, data.uid, 'password', hashedPassword), async.apply(User.reset.updateExpiry, data.uid), + async.apply(User.auth.revokeAllSessions, data.uid), ], function (err) { next(err); });