Hi,
I am a Data Programmer in VFP,I am new to learning Web Development through WestWind Web Conneciton.
I have installed the shareware applicaiton and trying to learn to build my application 1 day at a time.
I have taken the Login Security Code and tried to embed into my app.
Login works fine but I am getting an error on line :
this.oAuthenticatedUser = this.oUserSecurity.oUser
My Login Function Looks like this :
FUNCTION Login()
CLOSE TABLES
IF !USED("C:\wconnect\usersecurity")
USE C:\wconnect\usersecurity IN 0 ALIAS usersecurity
ENDIF
pcErrorMessage = ""
IF Request.IsPostback()
pcUsername = Request.Form("WebLogin_txtUsername")
pcPassword = Request.Form("WebLogin_txtPassword")
*!* SELECT usersecurity
IF SEEK(pcUsername,'usersecurity','lusername')
cPw = ALLTRIM(usersecurity.password)
IF pcPassword = cpw
this.customerlist()
endif
else
IF this.Authenticate("ANY",@pcErrorMessage)
Response.Redirect("default.htm")
ENDIF
endif
RETURN
ENDIF
My quesiton is :
Is DEFINE CLASS webdemo3process AS WWC_PROCESS same as wwProces becasue I have initialised "cAuthenticationMode = "UserSecurity" in WWC_PROCESS. is that right?
I guess I need more info. Where is this failing? .oAuthenticatedUser
is not set explicitly by our process class in recent versions so I'm not sure where that code is coming from.
Rather there is .oUserSecurity
which is set during the authentication process.
+++ Rick ---
Thanks so much for your prompt reply
I was looking for a Global Login Code on your Documentation pages and found this code.
Basically, I have a table called usersecurity which holds the username & password information.
I want to Authenticate the login detials against this table. If matches, the user can surf through all the other pages in the project.
Can you help me with a code which willdo this.
Once again, thanks for your reply
Kalpesh
I can't really help you with the information you've given. You posted code but not the code that is breaking.
There is no .oAuthenticatedUser
property that's built in. I believe the sample you're looking explicitly creates this property as a helper. But that's not really necessary.
+++ Rick ---