Fairly basic, where is the link between the drupal user and the contact stored ? I have drupal user accounts which have linked to the incorrect civicrm contact. The reason is that we have cases in civicrm where multiple
3 Answers
Your question cut off at the end but it sounds like you're looking for the civicrm_uf_match table.
-
Thank you for the fast response. Yes it was the civicrm_uf_match table that I wasn't seeing. I haven't looked at that table before. Oct 11, 2022 at 3:22
If the contact is linked to an incorrect record maybe it is better to check other contacts as or rebuild the whole contact link
Below are the steps to rebuild the whole contact link
Backup the CiviCRM database
Log in to the site as admin.
Take the site offline
Navigate to CiviCRM >> Contacts >> Find and Merge Duplicate Contacts
Set the Individual Unsupervised rule to Email only if not set(note down the current unsupervised rule since will need to revert back after the process)
Log out from the website
Run MySQL command under Civi DB,
TRUNCATE civicrm_uf_match;
Login back into the system.
Navigate to CiviCRM >> Administer >> Users and Permissions >> Synchronize Users to Contacts
Run the synchronization.
Revert back the Individual Unsupervised rule.
if you have duplicate contacts in civicrm, one of which is connected to the drupal user, and you need to merge the records and have the drupal user connect to a different civi contact then you can do so via the merge records screen - of course this results in one record being put in trash.
i agree with Demerit that sometimes you just need to do the correction in the civicrm_uf_match table, but for some situations it can be solved via the UI.
You can also make changes via the API Explorer.
"The reason is that we have cases in civicrm where multiple" is why i thought that merging might be all that you need
-
Thank you for the fast response. Yes it was the civicrm_uf_match table that I wasn't seeing. Oct 11, 2022 at 3:28