• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Control session length?

#1
A user is reporting being automatically logged out after 30 minutes. They prefer to not have permanent sessions, but would like to stay logged in for longer than 30 minutes. Is there a way to control this?
 

James

Well-known member
#2
ACP -> Options -> User Options -> Online Status Timeout (minutes)

(On second thought, I'm not sure if this actually logs them out or just stops showing them on who's online)
 
#5
Ok, is there any way to adjust such timer? The time given by the user was just an estimate, so I wouldn't be surprised if it was actually an hour that he experienced. I'm looking to set it to 2 hours.
 

James

Well-known member
#6
XenForo_Session:
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 (or at least a Brogan/Jake response ;))
 

Brogan

XenForo moderator
Staff member
#7
I'm no expert but I don't think any changes made to the lifetime will be reflected in existing cookies.

Won't really matter after an hour or so though (or the next log in) as a new cookie will be set.
 

Brivium

Well-known member
#12
I found that session timeout be cleared by Hourly Cron job -> This is the reason for maximum time = 60 minutes.

To fixed that Open CronJob and remove or move SessionOnline to another