I want to get the username after a user login ( the first time login is better), then post the username to an external http service to get some data, then write the fetched data to a local moodle database table. How to make it? I read the official documentation here, but no explicit guide.
Make a local plugin and create a function to run on the user_loggedin event.
Thank you for your tip! I will read the relevant doc.