File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -134,8 +134,10 @@ event:
134134 // src/AppBundle/EventListener/UserLocaleListener.php
135135 namespace AppBundle\EventListener;
136136
137+ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
137138 use Symfony\Component\HttpFoundation\Session\Session;
138139 use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
140+ use Symfony\Component\Security\Http\SecurityEvents;
139141
140142 /**
141143 * Stores the locale of the user in the session after the
@@ -164,6 +166,13 @@ event:
164166 $this->session->set('_locale', $user->getLocale());
165167 }
166168 }
169+
170+ public static function getSubscribedEvents()
171+ {
172+ return array(
173+ SecurityEvents::INTERACTIVE_LOGIN => array(array('onInteractiveLogin', 15)),
174+ );
175+ }
167176 }
168177
169178 Then register the listener:
You can’t perform that action at this time.
0 commit comments