]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed serious bug that allowed any existing user to use this page. Doh!
authormartin <martin>
Fri, 30 Nov 2001 15:21:25 +0000 (15:21 +0000)
committermartin <martin>
Fri, 30 Nov 2001 15:21:25 +0000 (15:21 +0000)
admin/index.php

index 080d854c3ebbf20f516750889d0efac669d266fe..c68dd77ce12d19e69e4edbc9392dfe3ffc400be8 100644 (file)
     }
 
     if (!isadmin()) {
-        if (record_exists_sql("SELECT * FROM user_admins")) {
-            require_login();
-        } else {
+        if (! record_exists_sql("SELECT * FROM user_admins")) {
             redirect("user.php");
         }
+        error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/");
     }