$previous_database = db_set_active('seperate_db')db_set_active($previous_database);function YOURMODULENAME_user($op, &$edit, &$account, $category = NULL) { if ($op == "delete") { // Delete the values from other because drupal will do the first } elseif ($op == "after_update"){ //1. get the UID //2. Select that data associated with the UID //3. Try to select the UID from the other db ($var would be that) if ($var) { //will return true if something was returned, false if nothing //use UPDATE here because values exist } else { //the user does not exist in the other db //use INSERT here becasue the value does not exist } }} db_set_active();