Merging contacts with uf_match records on different domains does not work correctly
uf_matches from other domains can be lost when the contact record with uf_matches is selected as the 'to delete' record.
Steps to recreate:
- Contact A on domain ID 1 has an authmap on domain ID 1, but not on domain ID 2:
- A duplicate contact record B is created on domain ID 2, but has no authmap (maybe from an event registration).
- An admin on domain ID 2 merges the two records, choosing B as the 'master' record to keep. On the merge screen, they cannot see the 'User' rel table option to move it across, because the uf_match is not on their domain:
- The contacts are merged, the uf_match is lost:
A side effect of this is if the uf_match for an alternate domain is on the 'main' record, a PHP warning is also shown relating to the blank row:
Expected results:
I would expect the uf_matches for the other domains to come across as well? Or do we think this could cause other problems?