summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-30 20:04:51 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-30 20:04:51 +0100
commit42897ac5cbd35b7ceb4894a9170e2f9d5348ca08 (patch)
tree6ad0c074dbf012fd744c592ccb1c2d0a79c0a68d /lib/private
parent45c41e2b2cefa97c9d8c3bc73cfc088839640d1d (diff)
parent2d9d0aedf8e6cc57581d745827612c509ed09030 (diff)
downloadnextcloud-server-42897ac5cbd35b7ceb4894a9170e2f9d5348ca08.tar.gz
nextcloud-server-42897ac5cbd35b7ceb4894a9170e2f9d5348ca08.zip
Merge pull request #21402 from owncloud/view-getuserobject-cache
Cache usermanager instance in view
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/files/view.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index fcea4828c49..045af5fe82c 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -86,6 +86,8 @@ class View {
private $updaterEnabled = true;
+ private $userManager;
+
/**
* @param string $root
* @throws \Exception If $root contains an invalid path
@@ -101,6 +103,7 @@ class View {
$this->fakeRoot = $root;
$this->lockingProvider = \OC::$server->getLockingProvider();
$this->lockingEnabled = !($this->lockingProvider instanceof \OC\Lock\NoopLockingProvider);
+ $this->userManager = \OC::$server->getUserManager();
}
public function getAbsolutePath($path = '/') {
@@ -1196,7 +1199,7 @@ class View {
* @return \OC\User\User
*/
private function getUserObjectForOwner($ownerId) {
- $owner = \OC::$server->getUserManager()->get($ownerId);
+ $owner = $this->userManager->get($ownerId);
if ($owner instanceof IUser) {
return $owner;
} else {