From: moodler Date: Thu, 24 Jul 2003 08:36:43 +0000 (+0000) Subject: YES!!! FINALLY fixed that damn bug that was causing the admin user X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3712e0b5b5ac089df85378e99b2e403bf44b708c;p=moodle.git YES!!! FINALLY fixed that damn bug that was causing the admin user to be skipped during installation! Bug 565 has the details, but basically it was caused by not initialising the variable $user before using it. Some people probably had a cookie called "user" that was polluting the variable. YAY! --- diff --git a/admin/user.php b/admin/user.php index c563aa9528..0a6614f1c8 100644 --- a/admin/user.php +++ b/admin/user.php @@ -1,7 +1,7 @@ firstname = get_string("admin"); $user->lastname = get_string("user"); $user->username = "admin"; @@ -29,6 +31,7 @@ error("SERIOUS ERROR: Could not create admin user record !!!"); } + unset($admin); $admin->userid = $user->id; if (! insert_record("user_admins", $admin)) { @@ -43,6 +46,7 @@ error("Could not find site-level course"); } + unset($teacher); $teacher->userid = $user->id; $teacher->course = $site->id; $teacher->authority = 1; @@ -256,13 +260,13 @@ } echo "
"; - echo "
"; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; if ($search) { echo ""; } - echo "
"; + echo ""; echo "
"; print_table($table);