Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 integrated login / session expiry / remember me
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 07 October 2003 :  01:36:56  Show Profile
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?

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 07 October 2003 :  02:05:20  Show Profile
I haven't done this myself, but snitz uses a cookie to determine whether or not to log in the user. So, the code you have suggested would be the way to do it.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07