From 67da1f7e5ac9fc5472b6041dcfdc81a4b8428379 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 20 Jan 2015 17:00:29 +0100 Subject: certificate manager only needs the user-id, no need to pass on the complete user object --- apps/files_sharing/lib/external/manager.php | 2 +- apps/files_sharing/lib/hooks.php | 4 ++-- apps/files_sharing/tests/server2server.php | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php index 968edba089a..35dcabbe50e 100644 --- a/apps/files_sharing/lib/external/manager.php +++ b/apps/files_sharing/lib/external/manager.php @@ -199,7 +199,7 @@ class Manager { $data['manager'] = $this; $mountPoint = '/' . $this->uid . '/files' . $data['mountpoint']; $data['mountpoint'] = $mountPoint; - $data['certificateManager'] = \OC::$server->getCertificateManager(\OC::$server->getUserSession()->getUser()); + $data['certificateManager'] = \OC::$server->getCertificateManager($this->uid); $mount = new Mount(self::STORAGE, $mountPoint, $data, $this, $this->storageLoader); $this->mountManager->addMount($mount); return $mount; diff --git a/apps/files_sharing/lib/hooks.php b/apps/files_sharing/lib/hooks.php index 6f23c103b1d..10e16be4a91 100644 --- a/apps/files_sharing/lib/hooks.php +++ b/apps/files_sharing/lib/hooks.php @@ -30,8 +30,8 @@ class Hooks { \OC::$server->getDatabaseConnection(), \OC\Files\Filesystem::getMountManager(), \OC\Files\Filesystem::getLoader(), - \OC::$server->getUserSession(), - \OC::$server->getHTTPHelper()); + \OC::$server->getHTTPHelper(), + $params['uid']); $manager->removeUserShares($params['uid']); } diff --git a/apps/files_sharing/tests/server2server.php b/apps/files_sharing/tests/server2server.php index 2d59f7be9cd..6e9c0dd0ddd 100644 --- a/apps/files_sharing/tests/server2server.php +++ b/apps/files_sharing/tests/server2server.php @@ -153,8 +153,9 @@ class Test_Files_Sharing_S2S_OCS_API extends TestCase { \OC::$server->getDatabaseConnection(), \OC\Files\Filesystem::getMountManager(), \OC\Files\Filesystem::getLoader(), - \OC::$server->getUserSession(), - \OC::$server->getHTTPHelper()); + \OC::$server->getHTTPHelper(), + $toDelete + ); $manager->removeUserShares($toDelete); -- cgit v1.2.3