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

EbrahemSamer's avatar

How to prevent multiple login using the same account on different devices PHP ?

I am making website and I want the user to login on just one device....

I was thinking to add extra column in the database to set it to "active" when login and "not active" when logout and depend on it at each login process....

Is this good way to do that ... or there is a better and optimized solution ?

0 likes
1 reply

Please or to participate in this conversation.