Skip to content

Commit 212df7c

Browse files
committed
[Fix #24682]: ensure federation cloud id is retruned if FN property not found
Signed-off-by: Guillaume Virlet <github@virlet.org>
1 parent ea4fc6b commit 212df7c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/private/Federation/CloudIdManager.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ 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, no FN is found on federated servers
90+
if (isset($entry['FN'])) {
91+
return $entry['FN'];
92+
} else {
93+
return $cloudID;
94+
}
9095
}
9196
}
9297
}

0 commit comments

Comments
 (0)