View Full Version : How would I reduce the expiration date of remember me cookie?
Wakey
12-11-2011, 02:11 PM
The remember me cookie is sets for a year, if I wanted to change this how would I without editing the files themselves?
I would like it limited to a Month but obviously don't want to set the general cookie timeout setting in admincp to this long?
Any advice on where to start would be appreciated.
Looks like you would have to edit includes/functions.php, this section:
if ($permanent)
{
$expire = TIMENOW + 60 * 60 * 24 * 365;
}
else
{
$expire = 0;
}
which is around line 2158 in the 4.1.8 code. It seems there are only two choices for expiration, either "session", which lasts as long as the browser window stays open, or "permanent", which is coded to 1 year. So if you change it you'll be changing the timeout for any other "permanent" cookies (if there are any).
Wakey
12-12-2011, 10:29 AM
Had been hoping for a way to do it with a plugin rather than editing the file but thats better than nothing so thanks for your help
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.