Problem/Motivation

When a session is logged out a message should be displayed so they know why they have been logged out. This no longer works on D8.5, possibly because the sessions table isn't read to display the messages?

Proposed resolution

Check and fix.

Comments

Dubs created an issue. See original summary.

jamiep’s picture

Hi, I've created a patch that displays messages to the logged-out session.

Also fixed a typo in _onSessionCollision__DropOldest ($session->id should be $session->sid).

porchlight’s picture

#2 fixed both problems I was having. Thanks!

porchlight’s picture

Status: Active » Reviewed & tested by the community
dubs’s picture

Works for me too - hopefully this can be committed soon :-)

valthebald’s picture

Just a note that PHP notice about $session->id is handled in #3010674

steven.wichers’s picture

Rerolled to remove unrelated bugfix from patch.

sutharsan’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/src/Services/SessionLimit.php
@@ -302,7 +314,7 @@ class SessionLimit implements EventSubscriberInterface {
-          ->dispatch('session_limit.disconnect', new SessionLimitDisconnectEvent($session->id, $event, $this->getMessage($event->getAccount())));
+          ->dispatch('session_limit.disconnect', new SessionLimitDisconnectEvent($session->sid, $event, $this->getMessage($event->getAccount())));

This in not in scope of this issue. It is fixed (better) in #3010674: PHP error on session collision. Both patches can not be used at the same time. Pls remove.

sutharsan’s picture

Status: Needs work » Reviewed & tested by the community

Ignore my comment above, I looked at the old patch.

  • suzymasri committed ef1d123 on 2.x
    Issue #2976595 by steven.wichers, JamieP: Messages no longer displayed...
suzymasri’s picture

Status: Reviewed & tested by the community » Fixed

Released in 2.0.0-beta1.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.