From 333f69e370463417b07e8478cfb9758b6bcab9d3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 13 Nov 2014 15:49:33 +0100 Subject: [PATCH] dont fail hard when a user doesnt exist --- apps/files_sharing/lib/mountmanager.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/files_sharing/lib/mountmanager.php b/apps/files_sharing/lib/mountmanager.php index 69c32aee845c..c4c34e9523e7 100644 --- a/apps/files_sharing/lib/mountmanager.php +++ b/apps/files_sharing/lib/mountmanager.php @@ -45,6 +45,9 @@ function __construct(Manager $mountManager, Loader $storageLoader, IUserManager public function setupMounts($options) { /** @var \OCP\IUser $user */ $user = $options['user_object']; + if (!$user) { + return; + } $shares = \OCP\Share::getItemsSharedWithUser('file', $user->getUID()); foreach ($shares as $share) { $owner = $this->userManager->get($share['uid_owner']);