-1
I am developing a PHP application where the user can stay logged in even after signing out, using cookies. However, the user cannot stay connected to 2 devices simultaneously.
More specifically, what I’d like to know is: How do I make a session (or cookies from that other session) invalid when the user accesses from another device?
You can have a secondary table, and based on this, you register Idusuario, the time it is logged in and its status, if it is status 1, it is logged in on some device and cannot log in again, and if it is not, allows login, before checking the login and password, does the status check
– Sr. André Baill
@In case he can log in again, the system only needs to disable it on the first device. Hence the doubt.
– Victor Otávio
Yes, if you do a SET status = 0, to depress, vc can make a script that checks the status, whenever it accesses some file and tals
– Sr. André Baill
This becomes complex when you want to deploy a device in real time when you log in to a second device. In that case you will have to use techniques such as long.
– Daniel Omine