I wonder what is the best solution to recognize multi account login in real time. In case when few (at least two) users login to same account, how to track this kind of cheat, what is the best solution ?
Store a unique session ID in your session and store the active session ID in the database. If someone new logs in, the session ID in the database changes and the old person's session automatically dies.
There are many ways to implement your desired functionality. The best approach is to create a new table that will handle user sessions. When the new user tries to log in, the system check for any active session. If it exists, you either destroy and create a new one, or show the user an error message ("You are already logged in").
But there are also other approaches to this issue. It depends on the system you are working on.
█ Dot.AL - .AL Domain Name Registration
█ .AL - Register your .AL Domains at. Get a Premium Domain NOW.
█ Shard Hosting - cPanel - Backup - 24/7 Monitoring Over 200 Ready Scripts
█ Awesome Promotions for you, check our announcements page.