Handling Login Events

It may be necessary for your application to execute certain rules when a new user logs in. For example, your application may collect the statistics of how many users are online or how many users have been using the application.

If you want to handle the login events in your application you need to define a special login notification and attach rules to this notification – see Adding/Editing Rules.

To add the login notification to the business space version:

  1. Right click on the “Notifications” node of the business space version in the Elements Tree to bring up the pop-up menu.
  2. Select the “Add Login Notification” or “Add Login Notification Attempt” command from the pop-up menu (it will be greyed out if the login notification has already been added). A new notification with the pre-defined name LoginNotification or LoginNotificationAttempt will appear in the Elements Tree. The difference between the LoginNotification and LoginNotificationAttempt is that the first is sent when a user successfully logs into the system and the second one – when the user’s attempt to login fails.

The login notification has a special structure that you cannot change (you can define other attributes but you cannot change the existing ones). This structure includes the LoginName attribute. The value of this attribute contains the name of the current user. There is also the RemoteAddress attribute which contains the IP address of the user who tries to login. You can check the value of these attributes in the rules attached to this notification and perform appropriate actions if required.

To turn off handling of the login events in the business space version delete the LoginNotification from the Elements Tree – see Adding/Editing Configuration Elements.

See also Handling Logout Events.

  • Last modified: 2022/09/13 18:15