Alexandre Jousset wrote:
Hello list,I've problems to set session expiry time per user.My goal is to have a default expiry time of "until you quit the browser" unless the user logs in and select a checkbox to have the site "remember" her (i.e. set expiry time to 1 year).I use the following plugins for session management : Session Session::State::Cookie Session::Store::DBII've looked at the docs and I've only found a way to set expiry time in MyApp.pm, and even with this I don't know how to set it for "until you quit the brower". If I put 0 the session expires immediately.To set the longer expiry time, I try:$c->config->{session}{expires} = 31536000 if $c->req->param('remember_me');
I think that will make the cookie expire on the 1st January 1971. Try "+31536000".
I have a feeling that an undef expiry will result in a session cookie, based on nothing more than guesswork and superstition.
Matt _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
