CakePHP Session Timeout on Inactivity only

前端 未结 5 597
别跟我提以往
别跟我提以往 2020-12-05 00:45

So the crux of this question is just how to prevent CakePHP from de-authenticating a session ONLY after a period of inactivity.

So, if the user does nothing then I e

5条回答
  •  旧时难觅i
    2020-12-05 01:27

        Configure::write('Session', array(
        'defaults' => 'cake',
        'timeout' => 1440, // The session will timeout after 30 minutes of inactivity
        'cookieTimeout' => 1440, // The session cookie will live for at most 24 hours, this does not effect session timeouts
        'checkAgent' => false,
        'autoRegenerate' => true, // causes the session expiration time to reset on each page load
    ));
    

    This works, though the session ends after few hours it is still better than ending in minutes.

提交回复
热议问题