- Issue created by @gapple
- π¨π¦Canada gapple
I tried
!SessionManager::isStarted()
, but that appears to also returntrue
for anonymous requests.It looks like
\Drupal::currentUser()->isAnonymous()
may be the best option? - @gapple opened merge request.
- Status changed to Needs review
almost 2 years ago 12:00am 22 March 2023 - πΊπΈUnited States agileadam Maine, USA
Brilliant! This fixes my issue π¬ User appears logged out until clicking Login link Fixed .
-
gapple β
committed bbaeb4b4 on 8.x-1.x
Issue #3349484: Validate token if session cookie provided but user is...
-
gapple β
committed bbaeb4b4 on 8.x-1.x
- Status changed to Fixed
almost 2 years ago 6:39am 22 March 2023 - π¨π¦Canada gapple
The previous commit introduced an issue with the Request event ordering, and resulted in the Persistent Login instance being updated on every request, and could possibly cause issues with regenerating sessions and losing temporary data.
It looks like I had an incorrect assumption in 2015 that PL had to act prior to authentication (I was probably trying to ensure that it acted before permissions checks). At this point CurrentUser is always anonymous, so PL will always validate and regenerate the instance value. Placing PL's event handler immediately after AuthenticationProvider will cause CurrentUser to be an authenticated user as expected if a session was started.
- Status changed to Needs work
over 1 year ago 4:54am 23 March 2023 - @gapple opened merge request.
-
gapple β
committed 89e48477 on 8.x-1.x
Issue #3349484: Fix Request Event order
-
gapple β
committed 89e48477 on 8.x-1.x
- Status changed to Fixed
over 1 year ago 5:00am 23 March 2023 Automatically closed - issue fixed for 2 weeks with no activity.