Skip to content

Commit 6d529ce

Browse files
committed
Use LazyUser when creating the user folder
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 312b719 commit 6d529ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/private/Files/Node/Root.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
namespace OC\Files\Node;
3434

35+
use OC\User\LazyUser;
3536
use OCP\Cache\CappedMemoryCache;
3637
use OC\Files\FileInfo;
3738
use OC\Files\Mount\Manager;
@@ -362,7 +363,7 @@ public function getName() {
362363
* @throws NotPermittedException
363364
*/
364365
public function getUserFolder($userId) {
365-
$userObject = $this->userManager->get($userId);
366+
$userObject = new LazyUser($userId, $this->userManager);
366367

367368
if (is_null($userObject)) {
368369
$e = new NoUserException('Backends provided no user object');
@@ -477,7 +478,7 @@ public function getByIdInPath(int $id, string $path): array {
477478
$absolutePath = rtrim($mount->getMountPoint() . $pathRelativeToMount, '/');
478479
return $this->createNode($absolutePath, new FileInfo(
479480
$absolutePath, $mount->getStorage(), $cacheEntry->getPath(), $cacheEntry, $mount,
480-
\OC::$server->getUserManager()->get($mount->getStorage()->getOwner($pathRelativeToMount))
481+
new LazyUser($mount->getStorage()->getOwner($pathRelativeToMount), \OC::$server->getUserManager())
481482
));
482483
}, $mountsContainingFile);
483484

0 commit comments

Comments
 (0)