summaryrefslogtreecommitdiffstats
path: root/lib/private/User/Manager.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-02-22 13:07:26 +0100
committerJulius Härtl <jus@bitgrid.net>2019-03-01 20:56:59 +0100
commit01b4db62fbc4230cff953a2385d305b149744b86 (patch)
tree788b5edf5acba069bd6996466ab9b1b30a6804d4 /lib/private/User/Manager.php
parent55ae7fa2a48ce38e2807a40632f282740c0e8117 (diff)
downloadnextcloud-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/User/Manager.php')
-rw-r--r--lib/private/User/Manager.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index f1a2029a7d5..62f02915c39 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -39,6 +39,7 @@ use OCP\IUserBackend;
use OCP\IUserManager;
use OCP\IConfig;
use OCP\UserInterface;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Class Manager
@@ -68,16 +69,14 @@ class Manager extends PublicEmitter implements IUserManager {
*/
private $cachedUsers = array();
- /**
- * @var \OCP\IConfig $config
- */
+ /** @var IConfig */
private $config;
+ /** @var EventDispatcherInterface */
+ private $dispatcher;
- /**
- * @param \OCP\IConfig $config
- */
- public function __construct(IConfig $config) {
+ public function __construct(IConfig $config, EventDispatcherInterface $dispatcher) {
$this->config = $config;
+ $this->dispatcher = $dispatcher;
$cachedUsers = &$this->cachedUsers;
$this->listen('\OC\User', 'postDelete', function ($user) use (&$cachedUsers) {
/** @var \OC\User\User $user */
@@ -156,7 +155,7 @@ class Manager extends PublicEmitter implements IUserManager {
return $this->cachedUsers[$uid];
}
- $user = new User($uid, $backend, $this, $this->config);
+ $user = new User($uid, $backend, $this->dispatcher, $this, $this->config);
if ($cacheUser) {
$this->cachedUsers[$uid] = $user;
}