Skip to content

Commit

Permalink
[Fix #24682]: ensure federation cloud id is retruned if FN property n…
Browse files Browse the repository at this point in the history
…ot found

Signed-off-by: Guillaume Virlet <github@virlet.org>
  • Loading branch information
doc75 authored and backportbot[bot] committed Dec 15, 2020
1 parent e6e6725 commit 4c818e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/private/Federation/CloudIdManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ protected function getDisplayNameFromContact(string $cloudId): ?string {
if (isset($entry['CLOUD'])) {
foreach ($entry['CLOUD'] as $cloudID) {
if ($cloudID === $cloudId) {
return $entry['FN'];
// Warning, if user decides to make his full name local only,
// no FN is found on federated servers
if (isset($entry['FN'])) {
return $entry['FN'];
} else {
return $cloudID;
}
}
}
}
Expand Down

0 comments on commit 4c818e1

Please sign in to comment.