I have 2 Drupal sites. They are on the same machine, but use different databases. Given a user click on one site, I want to be able to create a new user (or delete an old one) on the other site.

Given the sites are based on different databases on the same machine I guess I should be able to write the SQL that selects the other site's database and issues the SQL that does the INSERT or DELETE. But I suspect there's a bit more to adding or deleting users in a Drupal DB than that.

I'm game for wading through user.module to work it out, but maybe there is a facility or shortcut I don't know about that will make the job easier?