-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
2.0.4, 2.1.1
-
MOODLE_20_STABLE, MOODLE_21_STABLE
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:
events_trigger('user_login', $user);
just before the
return $user;