Merge branch 'MDL-41729-master' of git://github.com/lameze/moodle

This commit is contained in:
David Monllao 2016-12-19 11:51:43 +01:00
commit c1c0d9b9cf

View file

@ -178,14 +178,33 @@ class auth_plugin_shibboleth extends auth_plugin_base {
} }
/** /**
* Returns true if this authentication plugin can change the user's * Whether shibboleth users can change their password or not.
* password.
* *
* @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() { function can_change_password() {
if (!empty($this->config->changepasswordurl)) {
return true;
} else {
return false; 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;
}
}
/** /**
* Hook for login page * Hook for login page