[Security] Fixed calls to EventDispatcher::dispatchEvent()
This commit is contained in:
parent
06c682b4fb
commit
932f3b1f06
@ -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);
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user