diff --git a/course/loginas.php b/course/loginas.php index d5eef4e8e6e..58e51d6a5bf 100644 --- a/course/loginas.php +++ b/course/loginas.php @@ -12,7 +12,9 @@ error("Course ID was incorrect"); } - require_login($course->id); + if ($course->category) { + require_login($course->id); + } if ($return and $USER->realuser) { $USER = get_user_info_from_db("id", $USER->realuser);