aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-12-30 14:28:53 +0100
committerRobin Appelman <icewind@owncloud.com>2015-12-30 14:28:53 +0100
commit2d9d0aedf8e6cc57581d745827612c509ed09030 (patch)
treee3aa3856480f033e21b0336c06ff0c1e26d285bf /lib
parent9c4ab517353d950627f7e36d983728f0deeccde7 (diff)
downloadnextcloud-server-2d9d0aedf8e6cc57581d745827612c509ed09030.tar.gz
nextcloud-server-2d9d0aedf8e6cc57581d745827612c509ed09030.zip
Cache usermanager instance in view
Diffstat (limited to 'lib')
-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 {