aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Config/UserMountCache.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index 27d84e93838..19fc1a2b573 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -28,6 +28,7 @@
*/
namespace OC\Files\Config;
+use OC\User\LazyUser;
use OCP\Cache\CappedMemoryCache;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Diagnostics\IEventLogger;
@@ -213,13 +214,10 @@ class UserMountCache implements IUserMountCache {
/**
* @param array $row
* @param (callable(CachedMountInfo): string)|null $pathCallback
- * @return CachedMountInfo|null
+ * @return CachedMountInfo
*/
- private function dbRowToMountInfo(array $row, ?callable $pathCallback = null): ?ICachedMountInfo {
- $user = $this->userManager->get($row['user_id']);
- if (is_null($user)) {
- return null;
- }
+ private function dbRowToMountInfo(array $row, ?callable $pathCallback = null): ICachedMountInfo {
+ $user = new LazyUser($row['user_id'], $this->userManager);
$mount_id = $row['mount_id'];
if (!is_null($mount_id)) {
$mount_id = (int)$mount_id;