Doing something when a user logs in

Posted 3 years ago by etelford

What's a good way to perform some sort of action right after the user is authenticated?

In this scenario, my users can have many clients and I track the last id of the client they were last logged in as. When they log in, I want to assign that last client as the current client, store that in the session, and send them to that client's page (/clients/{id}/show).

I thought about override the postLogin() method in my AuthController, but that doesn't seem like the right place.

Any other thoughts?

Please sign in or create an account to participate in this conversation.