I use the member_API to transfer my sites session level username to the forums.
--- in functions_member_API.asp ---
' if the user is logged into the site, set the session variables for the forum member api
if len(session("username")) > 0 then
Session("USER") = session("username")
Session("PASSWORD") = session("user_id")
Session("EMAIL") = session("user_email_addr")
end if
--- end functions_member_API.asp ---
But I occassionally get emails from my users that for some reason they do not have permission to post. They are definitely logged into the site with the login session variables (as I have seen in the screenshots that show's their site session status), but I believe that, on occassion, they get logged off the forums even though they are still logged into the site.
Does anyone else have any issues like this, where the user gets logged off the forums, even though the site session is still active?
I was trying to figure out how all of the login code worked for the forums, and at which stages it was called, but it's not so straight forward for me to understand.
Is there a place that I could add some code that checks to see if the user is logged in to the site (by checking my site session variables) but not logged into the forum, and if so then force the forum login code to happen?
For instance:
' if the user is logged onto the site, but not logged into the forums, force the forum to log them in again.
if len(session("username")) > 0 and len(strLoggedInUsername) = 0 then
existingMemberAPI()
end if
Would that work? If so, where is the best place that I could put it so that it would get called on every page request?
Thanks!
JohnnyJ