Prevent restricted users from using "login as"

This commit is contained in:
moodler
2004-08-31 09:59:59 +00:00
parent 8913dce495
commit a5b9e4d94e
+2
View File
@@ -40,6 +40,8 @@
error("Only teachers can use this page!");
}
check_for_restricted_user($USER->username, "$CFG->wwwroot/user/view.php?id=$user");
if ($course->category and !isstudent($course->id, $user) and !isadmin()) {
error("This student is not in this course!");
}