]> git.mjollnir.org Git - moodle.git/commitdiff
Use the new is_internal_auth function
authormoodler <moodler>
Mon, 22 Sep 2003 14:01:45 +0000 (14:01 +0000)
committermoodler <moodler>
Mon, 22 Sep 2003 14:01:45 +0000 (14:01 +0000)
user/edit.html
user/edit.php
user/view.php

index 17cc511e1a28367190e774ec41181b135f318319..44c65750a3a434f33b9ccc72247cd6be14eccea0 100644 (file)
@@ -16,7 +16,7 @@ if (isadmin()) {
     $adminself = (($theadmin->id == $USER->id) and ($USER->id == $user->id));
     echo "<tr valign=top>";
     echo "<td><p>".get_string("username").":</td>";
-    if ($adminself || $CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
+    if ($adminself || is_internal_auth() ){
         echo "<td><input type=\"text\" name=\"username\" size=20 value=\"";
         p($user->username);
         echo "\">";
@@ -31,7 +31,7 @@ if (isadmin()) {
     echo "</td>";
     echo "</tr>";
 
-    if ($adminself || $CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
+    if ($adminself || is_internal_auth() ){
         echo "<tr valign=top>";
         echo "<td><p>".get_string("newpassword").":</td>";
         echo "<td><input type=\"text\" name=\"newpassword\" size=20 value=\"";
index 227e72e6915f714b042118145ba4ea21e652145c..0bda8b761fded0214fd080500be6444adcace49a 100644 (file)
@@ -192,7 +192,7 @@ function find_form_errors(&$user, &$usernew, &$err) {
                 $err["username"] = get_string("alphanumerical");
         }
 
-        if (empty($usernew->newpassword) and empty($user->password))
+        if (empty($usernew->newpassword) and empty($user->password) and is_internal_auth() )
             $err["newpassword"] = get_string("missingpassword");
 
         if (($usernew->newpassword == "admin") or ($user->password == md5("admin") and empty($usernew->newpassword)) ) {
index 0c5866075957f09a35b731b9553a5dddf3dfefd0..23a201136e6f2637fc6df47510181164a1123f81 100644 (file)
     echo "</TD></TR></TABLE></TABLE>";
 
     $internalpassword = false;
-    if ($CFG->auth == "email" or $CFG->auth == "none" or $CFG->auth == "manual") {
+    if (is_internal_auth()) {
         $internalpassword = "$CFG->wwwroot/login/change_password.php";
     }