fixed warning during installation when creating admin account

This commit is contained in:
skodak
2006-08-14 08:44:30 +00:00
parent 339a9129ec
commit b367b152ad
+2 -2
View 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) ){