Login event on substituted users

Hi,

We apply some logic whenever a user logs in. This is done through a UserLoginListener which implements the ApplicationListener for the UserLoggedInEvent.

@Override
    public void onApplicationEvent(UserLoggedInEvent event) {
    ...
    }

When using the substituted user logic however, this event is not triggered and we are not able to apply the same logic.

Is there any way to trigger this code for user substitution as well?

Thanks for any help, much appreciated.

Regards ,
-b

Hi,

Try to use UserSubstitutedEvent. The event is fired after a user is substituted and the new session is created.

1 Like