]> source.dussan.org Git - nextcloud-server.git/commitdiff
[Fix #24682]: ensure federation cloud id is retruned if FN property not found 24683/head
authorGuillaume Virlet <github@virlet.org>
Sun, 13 Dec 2020 12:12:23 +0000 (13:12 +0100)
committerGuillaume Virlet <github@virlet.org>
Sun, 13 Dec 2020 12:57:41 +0000 (13:57 +0100)
Signed-off-by: Guillaume Virlet <github@virlet.org>
lib/private/Federation/CloudIdManager.php

index d99fc3505201cb05709ac69a539256d41a7b19d7..02e3c7cd5130270c035e6aae2221c01d03dac311 100644 (file)
@@ -86,7 +86,13 @@ class CloudIdManager implements ICloudIdManager {
                        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;
+                                               }
                                        }
                                }
                        }