Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Global events > Login page

Events.After successful login

Scroll Prev Next More

Description

The AfterSuccessfulLogin event is executed on the Login page after the username and password were successfully verified.

Syntax

AfterSuccessfulLogin(username,password,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:

 

Session("UserEmail")=data("email")

Applies to pages

Login.

Recommended  sample events:

Add link to user profile to the menu

Change 'Logged on as' message

Redirect to user info edit page

Save user data in session variables

See also:

About Security API

After unsuccessful login

Before Login

Security screen