[Catalyst] Session expiry per user
Alexandre Jousset
mid at gtmp.org
Fri Mar 14 11:33:19 GMT 2008
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::DBI
I'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');
but it does not work...
Can somebody help me or give me pointers to docs about this?
Thanks.
Regards,
--
-- \^/ --
-- -/ O \--------------------------------------- --
-- | |/ \| Alexandre (Midnite) Jousset | --
-- -|___|--------------------------------------- --
More information about the Catalyst
mailing list