Are there any ways to drop user sessions when sessions are stored in default php session storage?
For example, I'm website admin and I want to ban logged user. User authentification status is stored in session. I'm deleting user row from database, but user is still logged and all nessesary authentification information is also stored in session. I need to drop/modify session.
Possible ways:
- load user's row from DB on every request
- create file, saying to delete user's session and check this file existence on every request
- crete file in /dev/shm (very fast checking), but file will be removed when rebooted
- store sessions in DB (overhead for my project)
- store sessions in nosql (redis, memcachedb) (overhead for my project)
Any elegant ways except storing user's sessions in database or nosql data storages?