diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-16 21:06:36 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-16 21:06:36 -0500 |
commit | 6a7b8ec60f265413ca88878dba6180456257d370 (patch) | |
tree | 5b36bf3122d6884cb09b66e623e28768e92ed9ba /app/Subscriber/AuthSubscriber.php | |
parent | 6a0895ef765ea7b83df02bb9789fda7415dee9a5 (diff) |
Make sure that some event subscribers are not executed multiple times
Diffstat (limited to 'app/Subscriber/AuthSubscriber.php')
-rw-r--r-- | app/Subscriber/AuthSubscriber.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Subscriber/AuthSubscriber.php b/app/Subscriber/AuthSubscriber.php index f834afec..250c1fd3 100644 --- a/app/Subscriber/AuthSubscriber.php +++ b/app/Subscriber/AuthSubscriber.php @@ -3,7 +3,6 @@ namespace Kanboard\Subscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Kanboard\Core\Base; use Kanboard\Core\Security\AuthenticationManager; use Kanboard\Core\Session\SessionManager; use Kanboard\Event\AuthSuccessEvent; @@ -15,7 +14,7 @@ use Kanboard\Event\AuthFailureEvent; * @package subscriber * @author Frederic Guillot */ -class AuthSubscriber extends Base implements EventSubscriberInterface +class AuthSubscriber extends BaseSubscriber implements EventSubscriberInterface { /** * Get event listeners @@ -41,6 +40,8 @@ class AuthSubscriber extends Base implements EventSubscriberInterface */ public function afterLogin(AuthSuccessEvent $event) { + $this->logger->debug('Subscriber executed: '.__CLASS__.'::'.__METHOD__); + $userAgent = $this->request->getUserAgent(); $ipAddress = $this->request->getIpAddress(); @@ -70,6 +71,7 @@ class AuthSubscriber extends Base implements EventSubscriberInterface */ public function afterLogout() { + $this->logger->debug('Subscriber executed: '.__CLASS__.'::'.__METHOD__); $credentials = $this->rememberMeCookie->read(); if ($credentials !== false) { @@ -90,6 +92,7 @@ class AuthSubscriber extends Base implements EventSubscriberInterface */ public function onLoginFailure(AuthFailureEvent $event) { + $this->logger->debug('Subscriber executed: '.__CLASS__.'::'.__METHOD__); $username = $event->getUsername(); if (! empty($username)) { |