diff options
Diffstat (limited to 'lib/private/group/manager.php')
-rw-r--r-- | lib/private/group/manager.php | 19 |
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; + } } |