aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-08-26 08:34:15 +0200
committerVincent Petry (Rebase PR Action) <PVince81@users.noreply.github.com>2022-12-16 17:15:21 +0000
commit174634448195a3b4593a4139a3043f5251a055ee (patch)
tree0dfd10fb0ad631c07dd34cb287b45d3ff509b20b /lib/private/legacy
parent3b7cc31f64d7feae07b424f977f6963d12da012d (diff)
downloadnextcloud-server-174634448195a3b4593a4139a3043f5251a055ee.tar.gz
nextcloud-server-174634448195a3b4593a4139a3043f5251a055ee.zip
Use display name cache on getStorageInfo
Signed-off-by: Julius Härtl <jus@bitgrid.net> Adapt test to also run isolated Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_Helper.php6
1 files changed, 3 insertions, 3 deletions
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 {