2

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 3

2

Your question cut off at the end but it sounds like you're looking for the civicrm_uf_match table.

1
  • 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
2

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

  1. Backup the CiviCRM database

  2. Log in to the site as admin.

  3. Take the site offline

  4. Navigate to CiviCRM >> Contacts >> Find and Merge Duplicate Contacts

  5. 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)

  6. Log out from the website

  7. Run MySQL command under Civi DB,

    TRUNCATE civicrm_uf_match;
    
  8. Login back into the system.

  9. Navigate to CiviCRM >> Administer >> Users and Permissions >> Synchronize Users to Contacts

  10. Run the synchronization.

  11. Revert back the Individual Unsupervised rule.

1

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

1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.