summaryrefslogtreecommitdiffstats
path: root/lib/private/group/manager.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-21 14:43:09 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-21 14:43:09 +0200
commit33144a5d806bbb01208588b7eaed69c1739e9839 (patch)
treed850c73ef3e4f91b2362dba830b1da486ccf0490 /lib/private/group/manager.php
parent036c8a2e56b3b53281561dfc6e20da20258086c9 (diff)
parent02af4269f27d4d7b4a3a053e23a614738293be2b (diff)
downloadnextcloud-server-33144a5d806bbb01208588b7eaed69c1739e9839.tar.gz
nextcloud-server-33144a5d806bbb01208588b7eaed69c1739e9839.zip
Merge pull request #19827 from owncloud/subadmin_non_static
Make OC_SubAdmin non static
Diffstat (limited to 'lib/private/group/manager.php')
-rw-r--r--lib/private/group/manager.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index 65ae49dfcd2..6905dd8f5f2 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -71,11 +71,13 @@ class Manager extends PublicEmitter implements IGroupManager {
*/
private $cachedUserGroups = array();
+ /** @var \OC\SubAdmin */
+ private $subAdmin = null;
/**
* @param \OC\User\Manager $userManager
*/
- public function __construct($userManager) {
+ public function __construct(\OC\User\Manager $userManager) {
$this->userManager = $userManager;
$cachedGroups = & $this->cachedGroups;
$cachedUserGroups = & $this->cachedUserGroups;
@@ -314,4 +316,19 @@ class Manager extends PublicEmitter implements IGroupManager {
}
return $matchingUsers;
}
+
+ /**
+ * @return \OC\SubAdmin
+ */
+ public function getSubAdmin() {
+ if (!$this->subAdmin) {
+ $this->subAdmin = new \OC\SubAdmin(
+ $this->userManager,
+ $this,
+ \OC::$server->getDatabaseConnection()
+ );
+ }
+
+ return $this->subAdmin;
+ }
}