Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AtomCoder's avatar

Logging out of sessions "Database Driver"

Can we just delete a session row in the database to invalidate a session or is there any reason why this should not be done ?

0 likes
2 replies
jlrdw's avatar

If you don't want users to stay logged in, disable the remember me feature. And I wouldn't worry about deleting the session, just let it expire.

AtomCoder's avatar

@jlrdw I've got a list of logged on browser sessions for each user. I want to allow each user to invalidate a specific session on that list if they feel like it wasnt them that logged in.

I've got logout other devices implemented but again, it would be nice to allow them to invalidate individual sessions.

Please or to participate in this conversation.