Skip to content

Commit 1935993

Browse files
authored
Merge pull request #24709 from nextcloud/backport/24683/stable20
[stable20] [Fix #24682]: ensure federation cloud id is retruned if FN property not found
2 parents afbc2d5 + a8f60c8 commit 1935993

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/private/Federation/CloudIdManager.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,13 @@ protected function getDisplayNameFromContact(string $cloudId): ?string {
8686
if (isset($entry['CLOUD'])) {
8787
foreach ($entry['CLOUD'] as $cloudID) {
8888
if ($cloudID === $cloudId) {
89-
return $entry['FN'];
89+
// Warning, if user decides to make his full name local only,
90+
// no FN is found on federated servers
91+
if (isset($entry['FN'])) {
92+
return $entry['FN'];
93+
} else {
94+
return $cloudID;
95+
}
9096
}
9197
}
9298
}

0 commit comments

Comments
 (0)