You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the condition in Module.php l.73 is wrong:
if(isset($cookie['remember_me']) && $cookieLogin == false)
When the user login normally with the form (and check 'Stay logged in'), it first creates a new cookie + serie, and then, on the next page load (on the page redirection after login), the condition is passed and the serie is updated. The condition should not be passed once the user is logged in. The update is useless and should not be done at that moment.
To avoid this and correct this bug, I propose the following condition:
if(isset($cookie['remember_me']) && !$userIsLoggedIn)
With that condition, the autologin will be tried only if the user is not already connected. It is easy to know if the user is logged in or not by calling:
$userIsLoggedIn = $e->getApplication()->getServiceManager()->get('zfcuser_auth_service')->hasIdentity();
Cheers
The text was updated successfully, but these errors were encountered:
Hi,
I believe the condition in Module.php l.73 is wrong:
if(isset($cookie['remember_me']) && $cookieLogin == false)
When the user login normally with the form (and check 'Stay logged in'), it first creates a new cookie + serie, and then, on the next page load (on the page redirection after login), the condition is passed and the serie is updated. The condition should not be passed once the user is logged in. The update is useless and should not be done at that moment.
To avoid this and correct this bug, I propose the following condition:
if(isset($cookie['remember_me']) && !$userIsLoggedIn)
With that condition, the autologin will be tried only if the user is not already connected. It is easy to know if the user is logged in or not by calling:
$userIsLoggedIn = $e->getApplication()->getServiceManager()->get('zfcuser_auth_service')->hasIdentity();
Cheers
The text was updated successfully, but these errors were encountered: