PDA

View Full Version : [How the right way to write it] Make cookietimeout different for member & guest


basketmen
02-21-2012, 11:33 PM
I want to set cookietimeout
for guest : 600
and for member : 9000


- So i emptied the value in admincp > vboptions > Cookies and http header options > Session timeout



- then i open includes/init.php file

I already tried replace these lines

if ($vbulletin->options['cookietimeout'] < 60)
{
// values less than 60 will probably break things, so prevent that
$vbulletin->options['cookietimeout'] = 60;
}






with this

if ($vbulletin->userinfo['userid'] == 0)
{
$vbulletin->options['cookietimeout'] = 600;
}
else
{
$vbulletin->options['cookietimeout'] = 9000;
}






or this

if (is_member_of($vbulletin->userinfo, 2, 6, 7))
{
$vbulletin->options['cookietimeout'] = 9000;
}
else
{
$vbulletin->options['cookietimeout'] = 600;
}







But its looks still not right, member looks like still using cookietimeout 600

Please help, how is the right way to make/write this

basketmen
03-02-2012, 04:46 AM
up, share some information if you have please