AudiTT @ MCI
|
Posted: 02/06/2002, 10:17 AM |
|
When a user logs in, I want to set there email address as a session variable, and the email address is in the same table as the rest of the login info...
Any help??
table = PPD_Active_Accounts (a view)
fldEmail = Email
....
If some one gives me a usable answer, I will send them a calling card from my company for 60Min... its the least I can do...
Thanks.
|
|
|
Ken Hardwick
|
Posted: 02/06/2002, 10:53 AM |
|
In your custom Login Event form, add a dlookup similar to below...
if bPassed > 0 then
'-------------------------------
' Login and password passed
'-------------------------------
'custom loginid....
Session("EPS_ID") = sLogin
'Lookup and save personid of user
Session("EPS_Person")= DLookUp("KMG_EPS_EMPLOYEE", "Person_ID", "KMG_LOGON_ID =" & ToSQL(sLogin, "Text") & " and PASSWRD=" & ToSQL(sPassword, "Text"))
Record_Login(Session("EPS_Person"))
Ken Hardwick
Norman,Ok
|
|
|
kmc
|
Posted: 02/06/2002, 12:50 PM |
|
Try...
Session("UserEmail") = DLookup("PPd_Active_Accounts","Email","LoginFieldName = " & Session("UserID")
Put this AFTER the line in the CC code that gets the USerID and USerRights sessions.
|
|
|
AudiTT @ MCI
|
Posted: 02/06/2002, 4:01 PM |
|
This responds with the UserID and not the Email... Any ideas..
Session("UserEmail") = DLookup("PPd_Active_Accounts","Email","LoginFieldName = ") & Session("UserID")
|
|
|
Ken Hardwick
|
Posted: 02/06/2002, 4:46 PM |
|
KMC had kindly suggested :
Session("UserEmail") = DLookup("PPd_Active_Accounts","Email","LoginFieldName = ") & Session("UserID")
which has a slight error which cause it to return the loginid only
The formula should be...
Session("UserEmail") = DLookup("PPd_Active_Accounts","Email","LoginFieldName = '" & Session("UserID") & "'")
Hopefully this should do it this time...
|
|
|
kmc
|
Posted: 02/06/2002, 9:14 PM |
|
G'day Ken, thanks.
Clumsy fingers and poor checking,
I think it's OK now
|
|
|
AudiTT @ MCI
|
Posted: 02/07/2002, 9:29 AM |
|
Thanks, Ken gets the card.
|
|
|
annnkay
|
Posted: 02/07/2002, 10:18 AM |
|
i just like to know are the commands that u use can be use in the jsp?
|
|
|
|