MDL-75826 profile: Redirect to profile page if returnto is profile.

This commit is contained in:
Meirza
2022-11-28 16:13:14 +07:00
parent 57c1e97bf1
commit 934d74a6ff
+3
View File
@@ -311,6 +311,9 @@ if ($userform->is_cancelled()) {
} else {
redirect($returnurl, get_string('changessaved'), null, \core\output\notification::NOTIFY_SUCCESS);
}
} else if ($returnto === 'profile') {
\core\session\manager::gc(); // Remove stale sessions.
redirect($returnurl, get_string('changessaved'), null, \core\output\notification::NOTIFY_SUCCESS);
} else {
\core\session\manager::gc(); // Remove stale sessions.
redirect("$CFG->wwwroot/$CFG->admin/user.php", get_string('changessaved'), null, \core\output\notification::NOTIFY_SUCCESS);