The OnLoggingIn method raises the LoggingIn event. Use the LoggingIn event to perform any processing that you need before authenticating a user or to perform custom validation.
Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.
The OnLoggingIn method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors:
When overriding OnLoggingIn in a derived class, be sure to call the base class's OnLoggingIn method so that registered delegates receive the event.