Hi: Several questions: Code I wrote long ago (2003) commneted out $session->delete() and $session->flush(). in numerous locations where a login fails for any reason. The sessions database contains all those failed session data from failed logins. In the sessions, failed login attempts are counted. If these sessions were deleted and flushed at each failure, how would attempts be kept track of? I am assuming it is through the session. Second: In the login function I am trying to set the expiration for 7 days in the future. Code below does not work. Several earlier place in the routine set different (short) expirations but the one below is the final in the login process.
my $timein = time(); $session->param('user_id',$uid); $session->param('username',$username); $session->param('forename', $forename); $session->param('lastname', $lastname); $session->param('timein', $timein); $session->param('timeout', 0); $session->param('attempts',0); $session->param('isloggedin',1); # $session->expires('+1d'); Expires($session, Now() + (86400*7)); AccessInOutLog($session); #Added 02/18/05 my $isloggedin = $session->param('isloggedin'); warn("Login User Line 420: SID '$sid' Session Logged In '$isl +oggedin'"); $session->flush(); #Set session cookie on client SetUserSessionCookie('CGISESSID', $sid);
And examining cookie CGISESSID in browser shows expiration now + 1 day (86400) not now + (86400*7). Any thoughts? Best regards Bob Tulloch
In reply to Sessions Questions by tultalk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |