SessionManager should not directly query the sessions table

Created on 18 March 2024, 9 months ago

Problem/Motivation

Found in πŸ“Œ Implement lazy database creation for sessions Active .

SessionManager::delete() directly queries the sesssions table, but the session handler is swappable, so if you don't use database sessions, it's going to run a query on an empty table.

I think we could implement a new interface on SessionHandler, something like 'DeleteByUserIdSessionInterface' with a ::deleteByUserId($uid) method, then check that interface and call the method instead from SessionManager.

That way alternative session implementations will actually be able to delete all sessions for a user too if they're able to.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated 2 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024