diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-08-04 19:16:54 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-08-04 19:16:54 +0300 |
commit | bae5f79cbd61d73c02347c830d64703f0ae0f31b (patch) | |
tree | 55c590f96b03c0ee10951d28894d9627879648f3 /lib | |
parent | 3a3eb261aad3158b41c5f1a99b48ee35fba39567 (diff) |
Use static variable for storing backends
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/UserBackend.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/UserBackend.php b/lib/UserBackend.php index f11f797f..fe9da631 100644 --- a/lib/UserBackend.php +++ b/lib/UserBackend.php @@ -43,7 +43,7 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend { /** @var IUserManager */ private $userManager; /** @var \OCP\UserInterface[] */ - private $backends = []; + private static $backends = []; /** * @param IConfig $config @@ -386,7 +386,7 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend { * @return null|UserInterface */ public function getActualUserBackend($uid) { - foreach($this->backends as $backend) { + foreach(self::$backends as $backend) { if($backend->userExists($uid)) { return $backend; } @@ -402,7 +402,7 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend { * @param \OCP\UserInterface[] $backends */ public function registerBackends(array $backends) { - $this->backends = $backends; + self::$backends = $backends; } private function getAttributeValue($name, array $attributes) { |