Home > Back-end >  Delphi SQL verify account password login window, how to judge another IP elsewhere on the same accou
Delphi SQL verify account password login window, how to judge another IP elsewhere on the same accou

Time:10-07

I've been working on similar QQ chat software, but think of how to prevent the log in two of the same account at the same time, such as testing the same account to another IP landing, is the current account has landed is forced out. Please recognize directions. It is better for reference code.

CodePudding user response:

It on record in the SQL table, save when landing, and then exit when the update,

CodePudding user response:

reference 1st floor zhangzhen_927116 response:
, please login record into the SQL table, save when landing, and then to update while the exit,




Client judgements, to judge by the server, the server will return when the login request success
As for how to judge by the server, the method of how to implement? Daniel to similar code under reference oh ~

CodePudding user response:

Table in the database, users increase IP field, login, update the IP, exits, IP is changed to empty, if repeated login, judgment to IP is not empty, save before an IP user disconnect, now login user login, and then update the IP,,,

CodePudding user response:

Is not very simple, list add a bool field logined judgment, if the login is set true, logout when set false
When login to determine the field
  • Related