Recent Topics

1 Dec 14, 2005 23:37    

Hello :)

There has been some small talk about $cookie_expires

My understanding is:
if $cookie_expires = 0 --> user logged out when browser closes
if $cookie_expires = time() --> user logged out immediately and hence will need to relogin every time he/she goes to another page
if $cookie_expires = time() + x seconds --> user logged out x seconds from now

Thats fine... but what about the variable $cookie_expired ?? What does it do?

My situation is I have a bunch of users that has logged in with the default one-year logout, but I want to change that down to a shorter period (week/day) but when I changed $cookie_expires = time() + 86400 (1 day). One day later those users are still logged in.

(I know the easiest way is just to expire all the cookies by changing the cookie name, but want to understand this a little more).

Thanks :)

2 Dec 15, 2005 02:03

$cookie_expires gets used when sending the cookie. This is just done when logging in, not on every request.

So changing it will only affect users that logout and login again.

Or you'd have to change the cookie name (and force all users to login again).


Form is loading...