diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-23 15:26:54 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-23 15:26:54 +0200 |
commit | 50620070009f4573fe3c0411b2b2b3803d88ef91 (patch) | |
tree | 795148d4344c4258ec79ff831d1a815d69cd0537 | |
parent | 9daf3e7410378bc217cc29abf434c8d46ebadc31 (diff) | |
parent | e3642f2f3dd9a60893f4c130276968288a72fbac (diff) | |
download | nextcloud-server-50620070009f4573fe3c0411b2b2b3803d88ef91.tar.gz nextcloud-server-50620070009f4573fe3c0411b2b2b3803d88ef91.zip |
Merge pull request #19998 from owncloud/backport-fix-deleted-ldap-user-sharing-stable8.1
[8.1] handle NoUserException in sharing code
-rw-r--r-- | apps/files_sharing/lib/cache.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index a5d6474dc3c..b8ef29e3436 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -31,6 +31,7 @@ namespace OC\Files\Cache; +use OC\User\NoUserException; use OCP\Share_Backend_Collection; /** @@ -62,7 +63,12 @@ class Shared_Cache extends Cache { } $source = \OC_Share_Backend_File::getSource($target, $this->storage->getShare()); if (isset($source['path']) && isset($source['fileOwner'])) { - \OC\Files\Filesystem::initMountPoints($source['fileOwner']); + try { + \OC\Files\Filesystem::initMountPoints($source['fileOwner']); + } catch(NoUserException $e) { + \OC::$server->getLogger()->logException($e, ['app' => 'files_sharing']); + return false; + } $mounts = \OC\Files\Filesystem::getMountByNumericId($source['storage']); if (is_array($mounts) and !empty($mounts)) { $fullPath = $mounts[0]->getMountPoint() . $source['path']; |