I have a "last_login" column in my users table that I'd like to update when a user logs in. I added this to the controller of my login post page:
DB::select('UPDATE '.DB::getTablePrefix().'users SET last_login=now() WHERE id=?', array($user->id));
But I have more than one login option (through social networks and such) for users. I could add this code to each of those options, but I'm wondering if there's a way to do it when Auth runs its authentication code to prevent having to add it to each controller method where I call it.
How could I do that, maybe by extending Auth or something?