chumbawumba
Junior Member
United Kingdom
304 Posts |
Posted - 07 October 2003 : 01:36:56
|
I have added a line to the end of the chkUser function in inc_func_Common.asp as follows: Session("svUsername")=fName Session("sviUserID")=MemberID
then, elsewhere on my *site* i can use these session vars to check if someone is logged in, and whether he has access to a particlar page. this all works fine, except for one problem:
if the user leaves the browser opens and walks away from the pc for a couple of hours, then it appears he is logged-out because the session has expired. all the member pages on my site then display a message that he is not logged in. however, if he then goes to the forum , he is still logged in & the session vars are re-created and everything is back to normal (without having to relogin).
My question is...phew... does the snitz forum constantly read the values in the cookie to check the user is logged in ? how does it work.???????
what can i do to prevent a user needed to click on the forum link to re-login ?
perhaps the following pseudo code included on all my pages?
IF session("sviUserid") <> "" then ' user is logged in , everything ok ELSE check snitzcookie to see if name and pwd are both in it. if they are, then relog him in else he didnt click 'remember me' so do nothing end if END IF
will that work, how have you overcome this sort of problem? |
|