Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow password changes with standard password change dialog if

$CFG->{'auth_'.$USER->auth.'_stdchangepassword'} is true.
  • Loading branch information...
commit e09ecb06045672bb730f9c7a6da6d3ddc12d1994 1 parent f9aa73d
paca70 authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 user/view.php
6 user/view.php
@@ -222,7 +222,7 @@
222 222
223 223
224 224 $internalpassword = false;
225   - if (is_internal_auth()) {
  225 + if (is_internal_auth() or ( $CFG->{'auth_'.$USER->auth.'_stdchangepassword'} and $CFG->{'auth_'.$USER->auth.'_stdchangepassword'} == 1)) {
226 226 if(empty($CFG->loginhttps)) {
227 227 $internalpassword = "$CFG->wwwroot/login/change_password.php";
228 228 } else {
@@ -233,12 +233,12 @@
233 233 // Print other functions
234 234 echo "<center><table align=\"center\"><tr>";
235 235 if ($currentuser and !isguest()) {
236   - if ($internalpassword) {
  236 + if ($internalpassword ) {
237 237 echo "<td nowrap=\"nowrap\"><form action=\"$internalpassword\" method=\"get\">";
238 238 echo "<input type=\"hidden\" name=\"id\" value=\"$course->id\" />";
239 239 echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
240 240 echo "</form></td>";
241   - } else if (strlen($CFG->changepassword) > 1) {
  241 + } else if ( strlen($CFG->changepassword) > 1 ) {
242 242 echo "<td nowrap=\"nowrap\"><form action=\"$CFG->changepassword\" method=\"get\">";
243 243 echo "<input type=\"submit\" value=\"".get_string("changepassword")."\" />";
244 244 echo "</form></td>";

0 comments on commit e09ecb0

Please sign in to comment.
Something went wrong with that request. Please try again.