[Catalyst] Session expiry per user

Alexandre Jousset mid at gtmp.org
Fri Mar 14 12:17:43 GMT 2008


	Hello Matt,

Matt Lawrence a écrit :
>>     To set the longer expiry time, I try:
>>
> 
> I think that will make the cookie expire on the 1st January 1971. Try 
> "+31536000".

	Looking at the "sessions" table, the value is correct, with or without 
the '+'. The problem seems to come from the line :

 >> $c->config->{session}{expires} = 31536000 if
 >> $c->req->param('remember_me');

	that works only once. When I request another page on the site, the 
param 'remember_me' is not set so the sessions falls back to 1 hour (tha 
value I've put by default).

> I have a feeling that an undef expiry will result in a session cookie, 
> based on nothing more than guesswork and superstition.

	Halas, 'undef' is like '0', the session expires immediately :-(

	Regards,
-- 
--      \^/                                            --
--    -/ O \---------------------------------------    --
--   | |/ \|      Alexandre (Midnite) Jousset      |   --
--    -|___|---------------------------------------    --



More information about the Catalyst mailing list