29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-27 07:33:41 +00:00

Saving User Profile logs you out of the backend (#42284)

This commit is contained in:
Nicola Galgano 2023-11-09 09:22:24 +01:00 committed by GitHub
parent dbe602fa71
commit ce929f3c69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -166,7 +166,7 @@ class ProfileController extends BaseController
// Redirect back to the edit screen.
$this->setMessage(Text::_('COM_USERS_PROFILE_SAVE_SUCCESS'));
$redirect = $app->getUserState('com_users.edit.profile.redirect');
$redirect = $app->getUserState('com_users.edit.profile.redirect', '');
// Don't redirect to an external URL.
if (!Uri::isInternal($redirect)) {
@ -184,7 +184,7 @@ class ProfileController extends BaseController
// Clear the profile id from the session.
$app->setUserState('com_users.edit.profile.id', null);
$redirect = $app->getUserState('com_users.edit.profile.redirect');
$redirect = $app->getUserState('com_users.edit.profile.redirect', '');
// Don't redirect to an external URL.
if (!Uri::isInternal($redirect)) {

View File

@ -281,7 +281,7 @@ class ProfileModel extends FormModel
}
// Destroy all active sessions for the user after changing the password
if ($data['password']) {
if ($data['password1']) {
UserHelper::destroyUserSessions($user->id, true);
}