Skip to content

Commit

Permalink
Merge pull request #24709 from nextcloud/backport/24683/stable20
Browse files Browse the repository at this point in the history
[stable20] [Fix #24682]: ensure federation cloud id is retruned if FN property not found
  • Loading branch information
rullzer authored Dec 28, 2020
2 parents afbc2d5 + a8f60c8 commit 1935993
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 1935993

Please sign in to comment.