I would like to create an additional piece of code which is executed asynchronously whenever an user logs in.
I want to be able to send the username of this user to a different system.
But I don't want to edit the auth plugins which are provided by default.
So what I'm asking for is the possibility to trigger user_login at/around the return of authenticate_user_login in /lib/moodlelib.php.
My basic idea would be to add:
just before the