diff options
author | Guillaume Virlet <github@virlet.org> | 2020-12-13 13:12:23 +0100 |
---|---|---|
committer | Guillaume Virlet <github@virlet.org> | 2020-12-13 13:57:41 +0100 |
commit | 83491c6c58f6c84abc71c6eee704deca1c1c7930 (patch) | |
tree | ba5a21852786d47b607f3a2f52826b77017a2c42 /lib | |
parent | ea4fc6b50712cce091a6decf8c4553eb0ed361e6 (diff) | |
download | nextcloud-server-83491c6c58f6c84abc71c6eee704deca1c1c7930.tar.gz nextcloud-server-83491c6c58f6c84abc71c6eee704deca1c1c7930.zip |
[Fix #24682]: ensure federation cloud id is retruned if FN property not found
Signed-off-by: Guillaume Virlet <github@virlet.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Federation/CloudIdManager.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php index d99fc350520..02e3c7cd513 100644 --- a/lib/private/Federation/CloudIdManager.php +++ b/lib/private/Federation/CloudIdManager.php @@ -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; + } } } } |