D
D
Dilik Pulatov2018-02-02 14:54:54
Yii
Dilik Pulatov, 2018-02-02 14:54:54

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

2 answer(s)
E
enchikiben, 2018-02-02
@EnChikiben

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

D
Dmitry Bay, 2018-02-02
@kawabanga

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 question

Ask a Question

731 491 924 answers to any question