The OnAfterLogin event allows you to perform some actions right after a user logged in. For example, you can track the user activity, redirect a user to a certain page or (temporarily) disable access to the website for users who are on vacations or for fired employees.

This page demonstrates how to implement the following tasks using this event:

Go to login page and try to login as redirected_user or blocked_user to see this in action. Click the button to investigate the event handler code.