E
E
Eyty2016-03-10 23:38:17
Yii
Eyty, 2016-03-10 23:38:17

Cookies are not deleted in the GoogleChrom browser, if you use the Yii-2 mechanism, how to make everything work?

Cookies are not deleted in GoogleChrom after the expiration of their lifetime, if using the Yii-2 mechanism:
Yii::$app->user->login($this->getUser(), 222);
But if you use the standard mechanism for adding cookies, then everything works, cookies are deleted:
setcookie("qwerty", time() + (222), "/");
Why does it work badly in yii2? How to make everything work well?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Soldatov, 2016-03-17
@TPbIHTPABA

In config

'session' => [
            'cookieParams' => [
                'lifetime' => 2592000,
            ],
        ],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question