When my user registers in Drupal and his account is created, I’d like to be able to create an account in a 3rd-party system (e.g. some moodle site).
Is that possible with an existing module? If not, what would be the preferred way to add this functionality?
I second Sebs suggestion of using
hook_user()for this, either after the fact on the ‘insert’ action, or upfront on ‘validate’, or on both, depending on how you need to deal with an eventual failure of Drupal itself or the 3rd-party-system.Also, given your other question in this context, it looks like you might be interested in the following posts/discussions concerning external authentication in general:
You might also want to take a look at the OpenID integration in Drupal core as a somewhat ‘authoritative’ source of examples.