From 01b4db62fbc4230cff953a2385d305b149744b86 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 22 Feb 2019 13:07:26 +0100 Subject: Add dispatcher events to User and Group objects Signed-off-by: Joas Schilling --- lib/private/Server.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/private/Server.php') diff --git a/lib/private/Server.php b/lib/private/Server.php index 8a49a8a8a94..68aba3645cf 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -316,14 +316,13 @@ class Server extends ServerContainer implements IServerContainer { $this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class); $this->registerService(\OC\User\Manager::class, function (Server $c) { - $config = $c->getConfig(); - return new \OC\User\Manager($config); + return new \OC\User\Manager($c->getConfig(), $c->getEventDispatcher()); }); $this->registerAlias('UserManager', \OC\User\Manager::class); $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); $this->registerService(\OCP\IGroupManager::class, function (Server $c) { - $groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger()); + $groupManager = new \OC\Group\Manager($this->getUserManager(), $c->getEventDispatcher(), $this->getLogger()); $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); }); @@ -1095,6 +1094,8 @@ class Server extends ServerContainer implements IServerContainer { $this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class); + $this->registerAlias(\OCP\Collaboration\Resources\IManager::class, \OC\Collaboration\Resources\Manager::class); + $this->registerService('SettingsManager', function (Server $c) { $manager = new \OC\Settings\Manager( $c->getLogger(), -- cgit v1.2.3