diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-22 17:53:15 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-22 17:53:15 +0200 |
commit | 7b5db9085db28ed4b59836f8e77a315278685f2e (patch) | |
tree | e0d15868729c57ced96f7587b2db81bc8ae09b0b | |
parent | 844c607a9a4e61caa324ecc16e8d6655b13bde31 (diff) | |
parent | db25f41da89425f608d4040f2c75be9efd8cd13f (diff) | |
download | nextcloud-server-7b5db9085db28ed4b59836f8e77a315278685f2e.tar.gz nextcloud-server-7b5db9085db28ed4b59836f8e77a315278685f2e.zip |
Merge pull request #19980 from owncloud/fix-deleted-ldap-user-sharing
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 fa6c2d4c4f5..9f3bf6508b1 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -32,6 +32,7 @@ namespace OC\Files\Cache; +use OC\User\NoUserException; use OCP\Share_Backend_Collection; /** @@ -64,7 +65,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']; |