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

This commit is contained in:
Meirza
2023-02-01 20:14:01 +07:00
parent 67bbf6c416
commit a6a6fbc5ec
+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));
}