Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 1d74e5b

Browse files
author
Dominik František Bučík
authored
Merge pull request #42 from CESNET/fix
Allow to get SP name from UIInfo>DisplayName if isset
2 parents 5abe6a5 + 3fea953 commit 1d74e5b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
5+
#### Fixed
6+
- Allow to get SP name from UIInfo>DisplayName if isset
57

68
## [v4.2.1]
79
#### Fixed

lib/DatabaseCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ private function getEntities($request)
227227
}
228228
if ($this->mode !== Config::MODE_SP) {
229229
$entities[Config::MODE_SP]['id'] = $request['Destination']['entityid'];
230-
$entities[Config::MODE_SP]['name'] = $request['Destination']['name']['en'] ?? '';
230+
if (isset($request['Destination']['UIInfo']['DisplayName']['en'])) {
231+
$entities[Config::MODE_SP]['name'] = $request['Destination']['UIInfo']['DisplayName']['en'];
232+
} else {
233+
$entities[Config::MODE_SP]['name'] = $request['Destination']['name']['en'] ?? '';
234+
}
231235
}
232236

233237
if ($this->mode !== Config::MODE_PROXY && $this->mode !== Config::MODE_MULTI_IDP) {

0 commit comments

Comments
 (0)