Skip to content

Commit

Permalink
Merge branch 'MDL-41729-master' of git://github.com/lameze/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonllao committed Dec 19, 2016
2 parents 2b5c9f0 + 056a513 commit c1c0d9b
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions auth/shibboleth/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,32 @@ function is_internal() {
}

/**
* Returns true if this authentication plugin can change the user's
* password.
* Whether shibboleth users can change their password or not.
*
* @return bool
* Shibboleth auth requires password to be changed on shibboleth server directly.
* So it is required to have password change url set.
*
* @return bool true if there's a password url or false otherwise.
*/
function can_change_password() {
return false;
if (!empty($this->config->changepasswordurl)) {
return true;
} else {
return false;
}
}

/**
* Get password change url.
*
* @return moodle_url|null Returns URL to change password or null otherwise.
*/
function change_password_url() {
if (!empty($this->config->changepasswordurl)) {
return new moodle_url($this->config->changepasswordurl);
} else {
return null;
}
}

/**
Expand Down

0 comments on commit c1c0d9b

Please sign in to comment.