]> git.mjollnir.org Git - moodle.git/commitdiff
Dont allow edit username when external authentication is active.
authorpaca70 <paca70>
Fri, 25 Apr 2003 16:42:07 +0000 (16:42 +0000)
committerpaca70 <paca70>
Fri, 25 Apr 2003 16:42:07 +0000 (16:42 +0000)
user/edit.html

index 73dd68b1fa4ac9eeb906ca073c18b19c048d74fe..35345c7f6239ec0551bcf3954bbdca96d0ca97f7 100644 (file)
 if (isadmin()) {
     echo "<tr valign=top>";
     echo "<td><P>".get_string("username").":</td>";
-    echo "<td><input type=text name=username size=20 value=\"";
-    p($user->username);
-    echo "\">";
-    if (isset($err["username"])) formerr($err["username"]);
+    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 {
+        echo "<td>";
+        p($user->username);
+    }
     echo "</td>";
     echo "</tr>";