aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User/Session.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/User/Session.php')
-rw-r--r--lib/private/User/Session.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 842d19d8d54..3b0231aea03 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -61,6 +61,7 @@ use OCP\IUserSession;
use OCP\Lockdown\ILockdownManager;
use OCP\Security\ISecureRandom;
use OCP\Session\Exceptions\SessionNotAvailableException;
+use OCP\User\Events\PostLoginEvent;
use OCP\Util;
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -398,13 +399,11 @@ class Session implements IUserSession, Emitter {
$firstTimeLogin = $user->updateLastLoginTimestamp();
}
- $postLoginEvent = new OC\User\Events\PostLoginEvent(
+ $this->dispatcher->dispatchTyped(new PostLoginEvent(
$user,
$loginDetails['password'],
$isToken
- );
- $this->dispatcher->dispatch(OC\User\Events\PostLoginEvent::class, $postLoginEvent);
-
+ ));
$this->manager->emit('\OC\User', 'postLogin', [
$user,
$loginDetails['password'],