Description
The AfterSuccessfulLogin event is executed on the Login page after the username and password were successfully verified.
Syntax
public XVar AfterSuccessfulLogin(dynamic username, dynamic password, dynamic data)
Arguments
username
a user-entered login name. In case of 'Login as Guest' situation username will be empty.
password
a user-entered password.
data
an array with existing user record in the Login table. Access fields by data["FieldName"].
Note: field names are case-sensitive. If the field name is PlayerId, you should use data["PlayerId"]. Note that data["playerid"] or data["PlayerID"] will not work.
In case of Active Directory based security, the data array contains attributes from the user record in AD. For instance, this is how you can retrieve the user's email and store it in a session variable:
XSession.Session["UserEmail"] = data["email"];
Applies to pages
Login.
Recommended sample events:
•Change 'Logged on as' message
•Redirect to user info edit page
•Save user data in session variables
See also: