]> git.mjollnir.org Git - moodle.git/commitdiff
Allow password changes with standard password change dialog if
authorpaca70 <paca70>
Sun, 10 Oct 2004 06:26:29 +0000 (06:26 +0000)
committerpaca70 <paca70>
Sun, 10 Oct 2004 06:26:29 +0000 (06:26 +0000)
$CFG->{'auth_'.$USER->auth.'_stdchangepassword'} is true.

user/view.php

index c95c4728b9e9864f28c3dcc659aa934cec68437c..f94557c359e7d6a104f7e0de3e09d38112125a7f 100644 (file)
 
 
     $internalpassword = false;
-    if (is_internal_auth()) {
+    if (is_internal_auth() or ( $CFG->{'auth_'.$USER->auth.'_stdchangepassword'} and $CFG->{'auth_'.$USER->auth.'_stdchangepassword'} == 1)) {
         if(empty($CFG->loginhttps)) {
         $internalpassword = "$CFG->wwwroot/login/change_password.php";
         } else {
 //  Print other functions
     echo "<center><table align=\"center\"><tr>";
     if ($currentuser and !isguest()) {
-        if ($internalpassword) {
+        if ($internalpassword ) {
             echo "<td nowrap=\"nowrap\"><form action=\"$internalpassword\" method=\"get\">";
             echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
             echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
             echo "</form></td>";
-        } else if (strlen($CFG->changepassword) > 1) {
+        } else if ( strlen($CFG->changepassword) > 1 ) {
             echo "<td nowrap=\"nowrap\"><form action=\"$CFG->changepassword\" method=\"get\">";
             echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
             echo "</form></td>";