0

I have 2 websites, and both have a login system, where the user can create an account to access a special portion of our website. Website A is a standard LAMP creation, and the user information is thus stored in a MySQL database. Website B is a site that is hosted on SharePoint and the user information is stored in a SharePoint Form Based Authentication (FBA) database.

I want to make it so that when a user creates an account on Website A, an account is automatically created on Website B.

Does anybody know of an easy way to do this? I'm thinking when the account is created on Website A, the website can send a query to both databases and create the same information. OR the 2 databases could be kept in sync somehow.

Any help would be greatly appreciated! Thanks much.

box
  • 83
  • 1
  • 5

1 Answers1

1

Regarding your first method: I think it's not good solution because you have to wait until server b won't response. Better way is to use event model based on queue.

You have queue of ids which are new created users and add user_id from the first server to this queue during user's creation. From other side you have cron script with infinite loop

while(1) {
    sleep(10);
    //check new user_id in queue
    if (no) {
        continue;
    }
    //create a new user in server B and remove user_id from queue
}
Andrej
  • 7,474
  • 1
  • 19
  • 21