From: martin Date: Fri, 30 Nov 2001 15:21:25 +0000 (+0000) Subject: Fixed serious bug that allowed any existing user to use this page. Doh! X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f3b9479b3e8a7a3bf5af6f8aff33199b1654a16b;p=moodle.git Fixed serious bug that allowed any existing user to use this page. Doh! --- diff --git a/admin/index.php b/admin/index.php index 080d854c3e..c68dd77ce1 100644 --- a/admin/index.php +++ b/admin/index.php @@ -69,11 +69,10 @@ } 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/"); }