aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-07-28 14:10:27 +0200
committerJoas Schilling <coding@schilljs.com>2023-07-28 14:11:22 +0200
commit3962cd0aa8ab7530deffa3b41cab2e11a01fd14a (patch)
treef8ec289aacdf05398e2407b8e7e54b547ee1986e /lib/private/User
parentb9e2f494a1307dac05b49fe74a224dc93f4c70e7 (diff)
downloadnextcloud-server-3962cd0aa8ab7530deffa3b41cab2e11a01fd14a.tar.gz
nextcloud-server-3962cd0aa8ab7530deffa3b41cab2e11a01fd14a.zip
fix!: Move getEventDispatcher usage to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/User')
-rw-r--r--lib/private/User/Session.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 840a3c04373..e7075bce47a 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -51,6 +51,7 @@ use OC_User;
use OC_Util;
use OCA\DAV\Connector\Sabre\Auth;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\EventDispatcher\GenericEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\NotPermittedException;
use OCP\IConfig;
@@ -63,9 +64,9 @@ use OCP\Security\Bruteforce\IThrottler;
use OCP\Security\ISecureRandom;
use OCP\Session\Exceptions\SessionNotAvailableException;
use OCP\User\Events\PostLoginEvent;
+use OCP\User\Events\UserFirstTimeLoggedInEvent;
use OCP\Util;
use Psr\Log\LoggerInterface;
-use Symfony\Component\EventDispatcher\GenericEvent;
/**
* Class Session
@@ -561,7 +562,8 @@ class Session implements IUserSession, Emitter {
}
// trigger any other initialization
- \OC::$server->getEventDispatcher()->dispatch(IUser::class . '::firstLogin', new GenericEvent($this->getUser()));
+ \OC::$server->get(IEventDispatcher::class)->dispatch(IUser::class . '::firstLogin', new GenericEvent($this->getUser()));
+ \OC::$server->get(IEventDispatcher::class)->dispatchTyped(new UserFirstTimeLoggedInEvent($this->getUser()));
}
}