Skip to content
Snippets Groups Projects
Unverified Commit b85a0dfc authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files
parent ce1d570e
Branches
Tags
No related merge requests found
......@@ -5,20 +5,20 @@
*
* @param array &$metadataHosted The metadata links for hosted metadata on the frontpage.
*/
function saml_hook_metadata_hosted(&$metadataHosted) {
assert(is_array($metadataHosted));
$sources = SimpleSAML_Auth_Source::getSourcesOfType('saml:SP');
foreach ($sources as $source) {
$metadata = $source->getMetadata();
$name = $metadata->getValue('name', NULL);
if ($name === NULL) {
$name = $metadata->getValue('OrganizationDisplayName', NULL);
$name = $metadata->getValue('name', null);
if ($name === null) {
$name = $metadata->getValue('OrganizationDisplayName', null);
}
if ($name === NULL) {
if ($name === null) {
$name = $source->getAuthID();
}
......@@ -32,5 +32,4 @@ function saml_hook_metadata_hosted(&$metadataHosted) {
$metadataHosted[] = $md;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment