After the transfer, the creation of the user session has ceased to occur. However, authorization occurs. Authorization do so
if ($this->validate()) { $db = new User(); foreach($db->find()->where(['username' => $this->username])->all() as $key=>$val) { return Yii::$app->user->login($val, $this->rememberMe ? 3600*24*30 : 0); } $db->username = $this->username; $db->password = sha1($this->password); $db->password_hash = sha1($this->password); $db->created_at = strtotime(time()); $db->updated_at = strtotime(time()); $db->email = $this->username; $db->status = 1; $db->auth_key = 1; $db->password_reset_token = sha1($this->password); $db->save(); return Yii::$app->user->login($db, $this->rememberMe ? 3600*24*30 : 0); } When iterating through the forex, I get the user object from the database. Further
return Yii::$app->user->login($val, $this->rememberMe ? 3600*24*30 : 0); Then magic happens - authorization happens, but when var_dump is displayed (Yii :: $ app-> user); Gives an object without the necessary parameters, apparently with the recording of sessions ... Help me figure out, there is access to the server. It is necessary to understand why does not record the session.