Commit a0600c86 by Yvon

loginlistener should only perform session operations if login is from remember me token

parent aaf91c73
......@@ -23,10 +23,13 @@ class LoginListener
public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)
{
$user = $event->getAuthenticationToken()->getUser();
if ($user->getGroups()->count() > 0) {
$groupe = $user->getGroups()->first();
$this->updateSessionGroup($user, $groupe);
$tokenName = (string) $event->getAuthenticationToken();
if(strpos($tokenName,"RememberMeToken") !== false) {
$user = $event->getAuthenticationToken()->getUser();
if ($user->getGroups()->count() > 0) {
$groupe = $user->getGroups()->first();
$this->updateSessionGroup($user, $groupe);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment