sessions and being authenticated are not the same thing. Sending even the login page to a visitor will create a session.
If the user is actually logged in, then remove the remember_me value from the users table
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using database driver for sessions and when I delete sessions from database, it will be recreated when user refreshes the page, why it doesn't make them logged out?
its a randomized string
the remember me value is stored in a cookie on the client. When the user starts a new session on the server it sends the cookie. If the contents of the cookie can be found in the users, then that user is immediately authenticated.
Please or to participate in this conversation.