Hello. Used the "recipe" authorization Yii. Specially did not pass the cookies:

Yii::app()->user->login($identity); 

because This is a web application and there is no need to save. This authorization should last for a time equal to the duration of the session. But logging in even after 1-2 days, I remain logged in. In php.ini, the default session is 24 minutes. Cookies checked - empty (except PHPSESSID).
Authorization is checked through Yii :: app () -> user-> isGuest, i.e. checks for the presence of the $ _SESSION ['id'] variable, which is set at the entrance.

How to explain and solve the problem?

P.S. Checked on the local and hosting.

    1 answer 1

    Check in configuration file

     'allowAutoLogin' => false 

    Otherwise, yii uses cookies based authentication .

    • @Mobyman, really stood such a config. And where did he get the cookies, if the browser didn’t seem to be visible? - Ray