I have placed the following code on the page that loads immediately after Login
<%A5
if a5ws_getcurrentuser() <> "" then
dim session.current_username as C
dim session.currenteMail As C
dim session.firstConsultant As N
session.currenteMail = a5ws_getcurrentuser()
'get user info
Table = "Consultants.dbf"
Filter = "email = '" + a5ws_getcurrentuser() + "'"
Result = "firstname"
session.current_username = lookup("consultants",Filter,Result)
Result = "lastname"
session.current_username = session.current_username + lookup("consultants",Filter,Result)
Result = "consultnum"
session.firstConsultant = lookup("consultants",Filter,Result)
'?"Hello " + session.current_username + "<a href = "RedirectPage_Login.a5w"> (logout)</a"
?session.current_username + " (" + session.firstConsultant + ") Is Logged In As " + session.currenteMail + "<a href = "RedirectPage_Login.a5w"> (logout)</a"
end if
%>
It runs when I test it with the Dev server... but when I try to run it with the stand alone WAS it fails:
Script Error
Obviously the stand-alone WAS cannot properly execute this code. I am trying to put the Logged-In User name and number into session variables and place that information along with a Logout hyperlink on this page.
How can I do this?
<%A5
if a5ws_getcurrentuser() <> "" then
dim session.current_username as C
dim session.currenteMail As C
dim session.firstConsultant As N
session.currenteMail = a5ws_getcurrentuser()
'get user info
Table = "Consultants.dbf"
Filter = "email = '" + a5ws_getcurrentuser() + "'"
Result = "firstname"
session.current_username = lookup("consultants",Filter,Result)
Result = "lastname"
session.current_username = session.current_username + lookup("consultants",Filter,Result)
Result = "consultnum"
session.firstConsultant = lookup("consultants",Filter,Result)
'?"Hello " + session.current_username + "<a href = "RedirectPage_Login.a5w"> (logout)</a"
?session.current_username + " (" + session.firstConsultant + ") Is Logged In As " + session.currenteMail + "<a href = "RedirectPage_Login.a5w"> (logout)</a"
end if
%>
It runs when I test it with the Dev server... but when I try to run it with the stand alone WAS it fails:
Script Error
Error:Script:" /RedirectPage_AfterLogin.a5w" line:107
session.current_username = lookup("consultants",Filter,Result)
error: lookup(consultants,email = '[email protected]',firstname) The system cannot find the file specified.
consultants.DBF
Obviously the stand-alone WAS cannot properly execute this code. I am trying to put the Logged-In User name and number into session variables and place that information along with a Logout hyperlink on this page.
How can I do this?
Comment