v1.18.x
barisusakli 8 years ago
parent 6d444ccacf
commit 6a4b082080

@ -79,8 +79,8 @@ define('forum/account/edit/password', ['forum/account/header', 'translator'], fu
onPasswordConfirmChanged(); onPasswordConfirmChanged();
return app.alertError(err.message); 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 { } else {
if (!passwordsmatch) { if (!passwordsmatch) {

@ -272,6 +272,7 @@ module.exports = function (User) {
async.parallel([ async.parallel([
async.apply(User.setUserField, data.uid, 'password', hashedPassword), async.apply(User.setUserField, data.uid, 'password', hashedPassword),
async.apply(User.reset.updateExpiry, data.uid), async.apply(User.reset.updateExpiry, data.uid),
async.apply(User.auth.revokeAllSessions, data.uid),
], function (err) { ], function (err) {
next(err); next(err);
}); });

Loading…
Cancel
Save