Fixed a bug when admins edit user accounts from external databases

This commit is contained in:
moodler 2003-06-13 02:37:52 +00:00
parent c05d9c3ee8
commit 8e487c3dca

View File

@ -14,22 +14,25 @@
if (isadmin()) {
echo "<tr valign=top>";
echo "<td><p>".get_string("username").":</td>";
if($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
echo "<td><input type=text name=username size=20 value=\"";
if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
echo "<td><input type=\"text\" name=\"username\" size=20 value=\"";
p($user->username);
echo "\">";
if (isset($err["username"])) formerr($err["username"]);
}else {
} else {
echo "<td>";
p($user->username);
echo "<input type=\"hidden\" name=\"username\" value=\"";
p($user->username);
echo "\">";
}
echo "</td>";
echo "</tr>";
if($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
if ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
echo "<tr valign=top>";
echo "<td><p>".get_string("newpassword").":</td>";
echo "<td><input type=text name=newpassword size=20 value=\"";
echo "<td><input type=\"text\" name=\"newpassword\" size=20 value=\"";
if (isset($user->newpassword)) p($user->newpassword);
echo "\">";
if (isset($err["newpassword"])) {