From: moodler <moodler>
Date: Fri, 13 Jun 2003 02:37:52 +0000 (+0000)
Subject: Fixed a bug when admins edit user accounts from external databases
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8e487c3dca9d641c46af11aa1a08af8eeffefac3;p=moodle.git

Fixed a bug when admins edit user accounts from external databases
---

diff --git a/user/edit.html b/user/edit.html
index aa2d421069..5a60961561 100644
--- a/user/edit.html
+++ b/user/edit.html
@@ -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"])) {