authTimeout in Yii2

后端 未结 6 822
余生分开走
余生分开走 2021-01-12 17:22

I am trying to log out user automatically in yii2 after he is idle for a fixed seconds . In web.php I added

\'user\' => [
             


        
6条回答
  •  太阳男子
    2021-01-12 17:58

    Just remove "enableAutoLogin" from your user config and it will just work fine.

    Your code shall look like this:

    'user' => [
                'identityClass' => 'app\models\User',
                'authTimeout'=>100
            ],
    

提交回复
热议问题