Merge pull request #24709 from nextcloud/backport/24683/stable20

[stable20] [Fix #24682]: ensure federation cloud id is retruned if FN property not found
This commit is contained in:
Roeland Jago Douma 2020-12-28 11:24:29 +01:00 committed by GitHub
commit 1935993e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -86,7 +86,13 @@ class CloudIdManager implements ICloudIdManager {
if (isset($entry['CLOUD'])) {
foreach ($entry['CLOUD'] as $cloudID) {
if ($cloudID === $cloudId) {
// 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;
}
}
}
}