Support How to increase session life time in Xenforo 2.2.4?

DarKMaSK

Loyal Member
Hi friends!
I want to know, how can I increase the session time-out? It seems that it has been pre-configured to 15 minutes or something like that. How can I increase it to 60 minutes?
 
Last edited:
Solution
60 minutes?
library/XenForo/Session.php
PHP:
public function __construct(array $config = array(), Zend_Cache_Core $cache = null, Zend_Db_Adapter_Abstract $db = null)
{
if (empty($config['admin']))
{
$defaultConfig = array(
'table' => 'xf_session',
'cookie' => 'session',
'lifetime' => 3600
);
}
Changing lifetime should increase the session timeout, I'm not sure if it'll do anything to existing sessions though so you might want to wait for some kind of official response
PHP:
'lifetime' => 3600
Change this
But in total you can have a cookie for 60 minutes , Which is valid and legal, I recommend you do not change

DarKMaSK

Loyal Member
But in this tutorial from the core you can change the time
I changed it in 'Users Option' but it did not work and if I change the core file, it will be lost with update. I have to do it after every update.
 
  • Tags
    session xenforo 2.2.4
  • Back
    Top Bottom