From 174634448195a3b4593a4139a3043f5251a055ee Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Fri, 26 Aug 2022 08:34:15 +0200 Subject: Use display name cache on getStorageInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl Adapt test to also run isolated Signed-off-by: Julius Härtl --- lib/private/legacy/OC_Helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/private/legacy') diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 3b409fd1d04..f16bc85a36c 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 { -- cgit v1.2.3