Make "Remember Me" Cookie Duration An Option

Chris D

XenForo developer
Staff member
Where is this code, exactly?

I'll see if this can be made into an add-on with configurable days.
 

Chris D

XenForo developer
Staff member
Sorry I thought you'd posted in the Request forum ;)

I agree it should be core.
 

Andy.N

Well-known member
Having this hard coded to 7 days is a but obnoxious. I changed the behavior to 180 days in my setup, but it seems like something that should just be a setting.
Shawn,
Where in the code we can change this cookie duration?
Thanks
 

Andy.N

Well-known member
It's in XenForo_Model_User::setUserRememberCookie()
Changed
Code:
XenForo_Helper_Cookie::setCookie('user', $value, 7 * 86400, true);
to
Code:
XenForo_Helper_Cookie::setCookie('user', $value, 180 * 86400, true);
Thanks Shawn
 
R

ragtek

Guest
Changed
Code:
XenForo_Helper_Cookie::setCookie('user', $value, 7 * 86400, true);
to
Code:
XenForo_Helper_Cookie::setCookie('user', $value, 180 * 86400, true);
Thanks Shawn
Even i don't think we'll see any xenforo upgrades in 2012, you shouldn't edit the xenforo core files:D

interested in an addon?
 

Attachments

Top