mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-66582 auth: Fix empty auth_logo in CAS/Shibboleth auth plugins
* set $idp['iconurl'] = null if no auth_logo * lib/templates/loginform.mustache will skip NULL iconurls * lib/ajax/service?info=tool_mobile_get_public_config will validate the NULL values
This commit is contained in:
parent
d7699706da
commit
5b39bf184d
@ -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 [
|
||||
[
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user