diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2023-01-06 08:58:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 08:58:48 +0100 |
commit | 264df536403929ef5ecf036552e5277d8b0c3e19 (patch) | |
tree | 832199ab201a518f16b3d330af4d9dfa25a2f79f /lib | |
parent | 317c07f7c67b530888405d0791054021ab4e154c (diff) | |
parent | 41fb0682b22649d45f04e556f9784ad715ce4b52 (diff) | |
download | nextcloud-server-264df536403929ef5ecf036552e5277d8b0c3e19.tar.gz nextcloud-server-264df536403929ef5ecf036552e5277d8b0c3e19.zip |
Merge pull request #35815 from nextcloud/backport/33709/stable25
[stable25] Use display name cache on getStorageInfo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index de42a7bc7fc..5ee6ec69ac2 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -547,10 +547,10 @@ class OC_Helper { $ownerId = $storage->getOwner($path); $ownerDisplayName = ''; - $owner = \OC::$server->getUserManager()->get($ownerId); - if ($owner) { - $ownerDisplayName = $owner->getDisplayName(); + if ($ownerId) { + $ownerDisplayName = \OC::$server->getUserManager()->getDisplayName($ownerId) ?? ''; } + if (substr_count($mount->getMountPoint(), '/') < 3) { $mountPoint = ''; } else { |