]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php
Move related event things in Event folder
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / EventListener / UserLocaleListener.php
diff --git a/src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php b/src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php
deleted file mode 100644 (file)
index 82d1a63..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-namespace Wallabag\CoreBundle\EventListener;
-
-use Symfony\Component\HttpFoundation\Session\Session;
-use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
-
-/**
- * Stores the locale of the user in the session after the
- * login. This can be used by the LocaleListener afterwards.
- *
- * @see http://symfony.com/doc/master/cookbook/session/locale_sticky_session.html
- */
-class UserLocaleListener
-{
-    /**
-     * @var Session
-     */
-    private $session;
-
-    public function __construct(Session $session)
-    {
-        $this->session = $session;
-    }
-
-    /**
-     * @param InteractiveLoginEvent $event
-     */
-    public function onInteractiveLogin(InteractiveLoginEvent $event)
-    {
-        $user = $event->getAuthenticationToken()->getUser();
-
-        if (null !== $user->getConfig()->getLanguage()) {
-            $this->session->set('_locale', $user->getConfig()->getLanguage());
-        }
-    }
-}