diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index 590cd6a3fa141..31a95ee2a460a 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -42,6 +42,7 @@ use OCP\IDBConnection; use OCP\IUser; use OCP\IUserManager; +use OCP\Server; use Psr\Log\LoggerInterface; /** @@ -392,7 +393,7 @@ public function getMountsForFileId($fileId, $user = null) { * @since 28.0.0 */ public function getNodesByUserForFileId(int $fileId): array { - $mounts = $this->getMountsForFileId($id); + $mounts = $this->getMountsForFileId($fileId); $rootFolder = Server::get(IRootFolder::class); $result = []; foreach ($mounts as $mount) { @@ -401,7 +402,7 @@ public function getNodesByUserForFileId(int $fileId): array { } $userFolder = $rootFolder->getUserFolder($mount->getUser()->getUID()); - $result[$mount->getUser()->getUID()] = $userFolder->getById($id); + $result[$mount->getUser()->getUID()] = $userFolder->getById($fileId); } return $result;