Answer the question
In order to leave comments, you need to log in
How can I implement authorization so that only one user can log into the system?
Hello!
The task is this ... when a user is authorized to the site, an account should not be accessed through another computer ...
how can this be done?
Answer the question
In order to leave comments, you need to log in
set a cookie for the user (once a minute you update this cookie in the background), remember somewhere on the server that he is authorized (such as a cookie is updated), if he tries to log in, check if there is a record of his authorization and that's all
Yii user Dektrium, for example, has an auth_key that is used for authorization. So, with a new login - rewrite the key to a new one, this is tantamount to anlogin from other devices.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question