Fixed serious bug that allowed any existing user to use this page. Doh!

This commit is contained in:
martin 2001-11-30 15:21:25 +00:00
parent 41111d545b
commit f3b9479b3e

View File

@ -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/");
}