我已經使用內置的yii2函數來設置會話。由於某些要求,我無法使用內置的yii2登錄。Yii2中的會話超時
所以我用下面設置會話:
的Yii :: $ APP->會話級>設置( 'UNIQUE_CODE', 'XXXX');
,在我的config/main.php文件
'session' => [
// this is the name of the session cookie used for login on the frontend
'name' => 'project-frontend',
'timeout' => 60*60*24*30,
],
但還是用戶從網站上一段時間後註銷。
那麼如何在這種情況下增加會話超時?