Apr 15, 2015; 13:19
Jon Harris
RE: [LP8.6] Implementing a "remember me" [solved]
Hi
I have combined "sessions" with "cookie_set", which for some reason I didn't think would work.
Jon
-----Original Message-----
From: lasso-bounces@lists.lassosoft.com [mailto:lasso-bounces@lists.lassosoft.com] On Behalf Of Jon Harris
Sent: 15 April 2015 11:15
To: lasso@lists.lassosoft.com
Subject: [LP8.6] Implementing a "remember me"
Hi List
We are trying to implement a "members area" on a site, where returning visitors have to login to see this content. This is all working fine, but I have a session issue.
The client wants us to add a "remember me" checkbox on the login page. So rather than a 120 minute session, they get a 1 year session.
Setting up the session is fine, after authentication we do this:
var('mySession') = 'memberSession' ;
if( var('rememberme') ) ;
session_Start(-Name=$mySession,
-Expires=525949,
-UseCookie) ;
Session_addvar($mySession, 'rememberme') ;
else ;
session_Start(-Name=$mySession,
-Expires=120,
-UseCookie) ;
/if ;
Problem is when the visitor comes back , I have to start the session again (with a new expiry time) to see if the remember me has been set or not, then restart the session again? Should I use two sessions? They still need the logout box to kill the session.
What's a good way of achieving this.
Thanks for any pointers.
Jon Harris
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com Official list archives available at http://www.lassotalk.com To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>