|
C
|
clig 9/16/2009 |
|
How would I add the user name or user id to the email I get when someone logs in? Thanks! Here is the event code:
|
|
|
|
501360 9/16/2009 |
|
if you have an email field in your user table assign a session var or use rsexists or existing sessions: tmpDict("body")="Someone has logged in - username: " & Session("UserID") // After successful login Sub AfterSuccessfulLogin(username,password) strSQLExists = "Select Name, Email, Role, simsLogin, simsRepNo, Identifier, DistList From NTSS_USERS Where LoginName = " & "'" & cstr(SESSION("UserID")) & "'" set rsExists = CreateObject("ADODB.Recordset") rsExists.Open strSQLExists, dbConnection if not rsExists.eof then SESSION("UserIDName") = rsExists("Name") SESSION("UserIDEmail") = rsExists("Email") SESSION("UserIDRole") = rsExists("Role") SESSION("simsLogin") = rsExists("simsLogin") SESSION("simsRepNo") = rsExists("simsRepNo") SESSION("Identifier") = rsExists("Identifier") SESSION("DistList") = rsExists("DistList") Session("LogiDatTim") = Now() else end if rsExists.Close : set rsExists = Nothing End Sub ' AfterSuccessfulLogin
|
|
|
C
|
clig 9/16/2009 |
|
Thanks, but that looks far too complicated for me to use! Can't I just add the Username / userID to the event? Sorry to be such a tool.
|
|
|
|
501361 9/16/2009 |
|
Clig: Beautiful! That worked perfectly. Thanks a ton. |
|
|
C
|
clig 9/16/2009 |
|
Clig: Beautiful! That worked perfectly. Thanks a ton.
|
|