]> git.mjollnir.org Git - moodle.git/commitdiff
fixed warning during installation when creating admin account
authorskodak <skodak>
Mon, 14 Aug 2006 08:44:30 +0000 (08:44 +0000)
committerskodak <skodak>
Mon, 14 Aug 2006 08:44:30 +0000 (08:44 +0000)
user/edit.html

index d2b29a970e283079c6c993fd6f0011255f466e20..f83296a5e7569ac94c653617755d06b2a628ad86 100644 (file)
@@ -21,8 +21,8 @@
 <table class="formtable">
 <?php
 if (isadmin()) {
-    $theadmin = get_admin();
-    $adminself = (($theadmin->id == $USER->id) and ($USER->id == $user->id));
+    $theadmin = get_admin(); // returns false during install
+    $adminself = (!empty($theadmin) and ($theadmin->id == $USER->id) and ($USER->id == $user->id));
     echo '<tr>';
     echo '<th>'.get_string('username').':</th>';
     if ($adminself || is_internal_auth($user->auth) ){