diff --git a/auth/cas/auth.php b/auth/cas/auth.php index 56e5a7de9fd..c29c9205e81 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -365,13 +365,17 @@ class auth_plugin_cas extends auth_plugin_ldap { return []; } - $iconurl = moodle_url::make_pluginfile_url( - context_system::instance()->id, - 'auth_cas', - 'logo', - null, - '/', - $this->config->auth_logo); + if ($this->config->auth_logo) { + $iconurl = moodle_url::make_pluginfile_url( + context_system::instance()->id, + 'auth_cas', + 'logo', + null, + null, + $this->config->auth_logo); + } else { + $iconurl = null; + } return [ [ diff --git a/auth/shibboleth/auth.php b/auth/shibboleth/auth.php index c52ad129135..ad0c55fbdee 100644 --- a/auth/shibboleth/auth.php +++ b/auth/shibboleth/auth.php @@ -294,12 +294,19 @@ class auth_plugin_shibboleth extends auth_plugin_base { } $url = new moodle_url('/auth/shibboleth/index.php'); - $iconurl = moodle_url::make_pluginfile_url(context_system::instance()->id, - 'auth_shibboleth', - 'logo', - null, - '/', - $config->auth_logo); + + if ($config->auth_logo) { + $iconurl = moodle_url::make_pluginfile_url( + context_system::instance()->id, + 'auth_shibboleth', + 'logo', + null, + null, + $config->auth_logo); + } else { + $iconurl = null; + } + $result[] = ['url' => $url, 'iconurl' => $iconurl, 'name' => $config->login_name]; return $result; }