Leverage existing authentication - Postet den (1366 Views)
Starting Member
web guy
Innlegg: 21
21
Hello, is it possible to use the existing forum authentication system on a custom web form.

I use the Snitz Forum for my building condominium association.
I need to create a system for my users to submit maintenance requests. I would like to use the existing Snitz authentication to capture username for each request and send it to a new table. Does anyone know which include files I need to add to a blank asp page which would allow me to grab snitz variables and also maintain security.

   
 Sidestørrelse 
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
Sure, you'll need to include these three:
"config.asp", "inc_sha256.asp", "inc_header.asp"
Postet den
Snitz Forums Admin
ruirib
Innlegg: 26364
26364
Definitely config.asp, inc_sha256.asp and inc_func_common.asp. inc_header.asp isn't strictly needed, as long as some of the code there is used in your page.
Postet den
Starting Member
web guy
Innlegg: 21
21
Thanks guys, perfect! Sorry I didn't respond sooner bigsmile
Would then I just use Request("username"), Request("email") to get the values?
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
Code:

Response.Write	"User Name="&strDBNTUserName
Response.Write "EMail="&strEMail
Your values, therefore, can be retrieved using the two str values.
Postet den
Starting Member
web guy
Innlegg: 21
21
Thank you Carefree cool
Got it~
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
The e-mail address is not stored in a variable, you'll need to create your own and modify the chkUser function accordingly.
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
I forgot, I added that a long time ago.
Ok to get the EMail from the database

Code:

strSql="SELECT M_EMAIL FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID="&MEMBERID
set rsMail=my_Conn.Execute(strSql)
if not rsMail.EOF then
strEMail=rsMail("M_EMAIL")
end if
Response.Write strEMail&"=strEMail"
Postet den
Starting Member
web guy
Innlegg: 21
21
Ok guys, thanks for all the support. I will give it a go this afternoon.
 
Du må legge inn en melding