]> git.mjollnir.org Git - moodle.git/commitdiff
Merged SITEID check for require_login from stable
authormoodler <moodler>
Sat, 25 Sep 2004 15:23:10 +0000 (15:23 +0000)
committermoodler <moodler>
Sat, 25 Sep 2004 15:23:10 +0000 (15:23 +0000)
lib/moodlelib.php

index 3e956c4da248b9b99049fe3a3d2f6fc3c1230f9f..ae7a9f036f16a8f73534a2e01fabb43265ef08e3 100644 (file)
@@ -590,6 +590,9 @@ function require_login($courseid=0, $autologinguest=true) {
 
     // Next, check if the user can be in a particular course
     if ($courseid) {
+        if ($courseid == SITEID) {   
+            return;   // Anyone can be in the site course
+        }
         if (!empty($USER->student[$courseid]) or !empty($USER->teacher[$courseid]) or !empty($USER->admin)) {
             if (isset($USER->realuser)) {   // Make sure the REAL person can also access this course
                 if (!isteacher($courseid, $USER->realuser)) {