MDL-76311 user: redirect to proper URL if a new user creation cancelled

This commit is contained in:
Meirza
2023-02-01 20:12:41 +07:00
parent 880462a168
commit f249a04e93
+2
View File
@@ -165,6 +165,8 @@ if ($returnto === 'profile') {
} else {
$returnurl = new moodle_url('/user/profile.php', array('id' => $user->id));
}
} else if ($user->id === -1) {
$returnurl = new moodle_url("/admin/user.php");
} else {
$returnurl = new moodle_url('/user/preferences.php', array('userid' => $user->id));
}