mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Closed hole when using userid information from form data (merged from STABLE)
This commit is contained in:
parent
ce791f885e
commit
1a86eccccd
@ -39,7 +39,7 @@
|
||||
require_login($course->id);
|
||||
}
|
||||
|
||||
if ($USER->id <> $user->id and !isadmin()) {
|
||||
if (($USER->id <> $user->id) && !isadmin()) {
|
||||
error("You can only edit your own information");
|
||||
}
|
||||
|
||||
@ -65,6 +65,10 @@
|
||||
|
||||
if ($usernew = data_submitted()) {
|
||||
|
||||
if (($USER->id <> $usernew->id) && !isadmin()) {
|
||||
error("You can only edit your own information");
|
||||
}
|
||||
|
||||
if (isset($USER->username)) {
|
||||
check_for_restricted_user($USER->username, "$CFG->wwwroot/course/view.php?id=$course->id");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user