We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

how to change cookie timeout | Forum

moath
moath Feb 3 '15
hello guys .. how to change cookie timeout ? if users leave site without logout . to make them online 20 minute .

cause my site its very new 

i use 1.7.2

i know there some plugins , but ill do that manually

thx all

The Forum post is edited by moath Feb 3 '15
moath
moath Feb 3 '15

Quote from Rebecca

Open ow_system_plugins/base/bol/user_service.php 


and change the following piece of code:


setcookie('ow_login', $loginCookie->getCookie(), (time() + 86400 * 7), '/', null, null, true);


to:


setcookie('ow_login', $loginCookie->getCookie(), (time() + 60 * 20), '/', null, null, true);


for 20 min. timeout


thanks so much  rebecca
ross Team
ross Feb 4 '15
or you can change the time here:

ow_system_plugins/base/bol/user_service.php


 public function deleteExpiredOnlineUsers()    {        $timestamp = time() - 30 * 60; //30 minutes
        $this->userOnlineDao->deleteExpired($timestamp);

Emil
Emil Nov 13 '15

Quote from ross or you can change the time here:

ow_system_plugins/base/bol/user_service.php


 public function deleteExpiredOnlineUsers()    {        $timestamp = time() - 30 * 60; //30 minutes
        $this->userOnlineDao->deleteExpired($timestamp);

Hi Ross, can you elaborate what exactly do I have to change in the code above in order to make the default from 30 minutes to 60 minutes?


Thanks

ross Team
ross Nov 15 '15
Topic was moved from General Questions.