diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-22 13:07:26 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-03-01 20:56:59 +0100 |
commit | 01b4db62fbc4230cff953a2385d305b149744b86 (patch) | |
tree | 788b5edf5acba069bd6996466ab9b1b30a6804d4 /lib/private/Server.php | |
parent | 55ae7fa2a48ce38e2807a40632f282740c0e8117 (diff) | |
download | nextcloud-server-01b4db62fbc4230cff953a2385d305b149744b86.tar.gz nextcloud-server-01b4db62fbc4230cff953a2385d305b149744b86.zip |
Add dispatcher events to User and Group objects
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 7 |
1 files changed, 4 insertions, 3 deletions
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(), |