MDL-60435 auth_shibboleth: dont display button if not configured

This commit is contained in:
Mark Nelson
2018-07-16 18:31:57 +08:00
parent 4826b1e42b
commit 87647c07fb
+6
View File
@@ -287,6 +287,12 @@ class auth_plugin_shibboleth extends auth_plugin_base {
public function loginpage_idp_list($wantsurl) {
$config = get_config('auth_shibboleth');
$result = [];
// Before displaying the button check that Shibboleth is set-up correctly.
if (empty($config->user_attribute)) {
return $result;
}
$url = new moodle_url('/auth/shibboleth/index.php');
$iconurl = moodle_url::make_pluginfile_url(context_system::instance()->id,
'auth_shibboleth',