If Wang in a to land the account, and Xiao Chen in the B also landed in the account, then a to the small Wang computer pop up a hint: Your account has been landed elsewhere, and then the account of the small King landing automatically pushed offline.
In what way?
Reply to discussion (solution)
Log in??? Log in??? Log in IP, the root IP award?
If you log in to the ground?? The last time you log in to the ground, and the accesses into?? In a certain???, the department of information? Tips for the last login?
Each time through the login form of the site, after successful login, the database user table in the user data, update a new key (according to some conditions randomly generated strings), and hit the cookie.
All pages in the site, check each refresh: The value of the cookie and the value of the key in the database table, do a comparison. Unequal, clear cookies, kick out.
This can only be judged by IP.
Now that you are logged in, check the user table
Add a field to the user table to store the login status
Check the login status while checking the legality of the user. If you are logged in, you are not allowed to log in
If the logged-on user does not exit voluntarily, and then is forced to reset by the administrator if necessary
Using the database to manage the session itself, there is a user ID field. If you have the same ID in the library after logging in, you are repeatedly logged in. Delete which session, which user is offline.
Whether this is an online field in the User table, check this field when logging in
To determine the login status is logged in the state is changed to 1 this time when the login will be two 1 there is a conflict can be achieved only login (blind)
You can generate a unique string at login, such as the current timestamp record to the database, but also recorded in the session, each time the page operation, determine whether the user is logged in, but also judge the string, not the same as prompted to log in elsewhere.