]> git.mjollnir.org Git - moodle.git/commitdiff
Further fixes to the last fix ... the same thing was happening further down.
authormoodler <moodler>
Thu, 24 Jul 2003 14:52:41 +0000 (14:52 +0000)
committermoodler <moodler>
Thu, 24 Jul 2003 14:52:41 +0000 (14:52 +0000)
admin/user.php

index 0a6614f1c890409c0433a65f820be6e1874bde73..896370f3292781e84ac715b39256932b3bd89ec7 100644 (file)
     optional_variable($page, 0);
     optional_variable($search, "");
 
+    unset($user);
+    unset($admin);
+    unset($teacher);
+
     if (! record_exists("user_admins")) {   // No admin user yet
 
-        unset($user);
         $user->firstname = get_string("admin");
         $user->lastname  = get_string("user");
         $user->username  = "admin";
@@ -31,7 +34,6 @@
             error("SERIOUS ERROR: Could not create admin user record !!!");
         }
 
-        unset($admin);
         $admin->userid = $user->id;
 
         if (! insert_record("user_admins", $admin)) {
@@ -46,7 +48,6 @@
             error("Could not find site-level course");
         }
 
-        unset($teacher);
         $teacher->userid = $user->id;
         $teacher->course = $site->id;
         $teacher->authority = 1;