]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed a bug when admins edit user accounts from external databases
authormoodler <moodler>
Fri, 13 Jun 2003 02:37:52 +0000 (02:37 +0000)
committermoodler <moodler>
Fri, 13 Jun 2003 02:37:52 +0000 (02:37 +0000)
user/edit.html

index aa2d421069fa364e3380a6b9e1cfa480072606b4..5a60961561946ebb9982304bb2c3cc42f2c2d88a 100644 (file)
 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"])) {