- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I think this is doable in D9+ as follows:
Implement hook_user_logout which gets called before logout, set some sort of flag that a user is being logged out.
Add an event listener for the
\Drupal\Core\Session\AccountEvents::SET_USER
event, if the flag from above is set and the new set user is anonymous, add the message, if not, unset the flag.Bit janky to have a hook for before and event for after, but the APIs are there.
- πΊπΈUnited States DamienMcKenna NH, USA
Should this not be fixed in core?
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Are you meaning that core copies the messages from one session to the next?
- Status changed to Active
about 2 years ago 8:39pm 2 March 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Ok, then let's keep it open