diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php index eddb079aaf..c5baa18dfb 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php @@ -82,7 +82,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface if (null !== $this->dispatcher) { $loginEvent = new InteractiveLoginEvent($request, $token); - $this->dispatcher->notify(Events::onSecurityInteractiveLogin, $loginEvent); + $this->dispatcher->dispatchEvent(Events::onSecurityInteractiveLogin, $loginEvent); } } catch (AuthenticationException $failed) { $this->securityContext->setToken(null); diff --git a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php index 6c89a54beb..c95ff0d2b0 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -152,7 +152,7 @@ class SwitchUserListener implements ListenerInterface if (null !== $this->dispatcher) { $switchEvent = new SwitchUserEvent($request, $original->getUser()); - $this->dispatcher->notify(Events::onSecuritySwitchUser, $switchEvent); + $this->dispatcher->dispatchEvent(Events::onSecuritySwitchUser, $switchEvent); } return $original;