]> git.mjollnir.org Git - moodle.git/commitdiff
Main admin can never change their own authentication method from "manual"
authormoodler <moodler>
Fri, 8 Oct 2004 13:15:13 +0000 (13:15 +0000)
committermoodler <moodler>
Fri, 8 Oct 2004 13:15:13 +0000 (13:15 +0000)
user/edit.html

index 3e7ab0eb3605b781910b31ac4a88c79bfad9a304..e695eb7a7fec522ff80a652f893a1373da25b77a 100644 (file)
@@ -38,10 +38,12 @@ if (isadmin()) {
     foreach ($modules as $module) {
         $auth_options[$module] = get_string("auth_$module"."title", "auth");
     } 
-    echo '<tr valign="top">';
-    echo '<td align="right">'.get_string("chooseauthmethod","auth").'</td>' . "\n<td>";
-    choose_from_menu ($auth_options, "auth", $user->auth);
-    echo "</td></tr>\n";
+    if (!$adminself) {    /// Main admin is ALWAYS default manual
+        echo '<tr valign="top">';
+        echo '<td align="right">'.get_string("chooseauthmethod","auth").'</td>' . "\n<td>";
+        choose_from_menu ($auth_options, "auth", $user->auth);
+        echo "</td></tr>\n";
+    }
 
     if ($adminself || is_internal_auth($user->auth) || (!empty($CFG->{'auth_'.$user->auth.'_stdchangepassword'}))) {
         echo "<tr valign=\"top\">";