The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Has anyone ever put together a "bare minimum" file that could be included on non-forum pages just to detect if the visitor is a logged in forum member? Just enough to check mlev I suppose?
Postet den
I use this in a real website:
You will need cookies set to forum for this to work. You may also have to add the forum path to the includes.
Code:
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_func_common.asp"-->
'Get the MemberID from the forum login
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
'copying stuff from inc_header.asp...
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
if trim(strDBNTUserName) <> "" and trim(Request.Cookies(strUniqueID & "User")("Pword")) <> "" then
mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
else
MemberID = -1
mLev = 0
end If
my_conn.Close
Set my_conn = Nothing
You will need cookies set to forum for this to work. You may also have to add the forum path to the includes.
Postet den
Thanks Rui, I will give it a go this week.
Postet den
Let me know if you have any issues.
Postet den
Well, months and months later I've finally gotten around to testing this and it works like a charm. Thanks Rui.
Postet den
Cool. You're welcome
.
Email Member
Message Member
Post Moderation
Filopplasting
If you're having problems uploading, try choosing a smaller image.
Forhåndsvis post
Send Topic
Loading...