Answers.Body: <p>If the contact is linked to an incorrect record maybe it is better to check other contacts as or rebuild the whole contact link</p>
  <p>Below are the steps to rebuild the whole contact link</p>
  <ol>
  <li><p>Backup the CiviCRM database</p>
  </li>
  <li><p>Log in to the site as admin.</p>
  </li>
  <li><p>Take the site offline</p>
  </li>
  <li><p>Navigate to CiviCRM &gt;&gt; Contacts &gt;&gt; Find and Merge Duplicate Contacts</p>
  </li>
  <li><p>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)</p>
  </li>
  <li><p>Log out from the website</p>
  </li>
  <li><p>Run MySQL command under Civi DB,</p>
  <pre><code>TRUNCATE civicrm_uf_match;
  </code></pre>
  </li>
  <li><p>Login back into the system.</p>
  </li>
  <li><p>Navigate to CiviCRM &gt;&gt; Administer &gt;&gt; Users and Permissions &gt;&gt; Synchronize Users to Contacts</p>
  </li>
  <li><p>Run the synchronization.</p>
  </li>
  <li><p>Revert back the Individual Unsupervised rule.</p>
  </li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-10T08:16:33.147Z
Answers.LastActivityDate: 2022-10-10T08:16:33.147Z
Answers.UserDisplayName: Pradeep Nayak
Answers.Body: <p>Your question cut off at the end but it sounds like you're looking for the civicrm_uf_match table.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-11T03:22:06.200Z
Answers.Text: 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.
Answers.UserDisplayName: Simon Moseley
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-09T23:13:29.473Z
Answers.LastActivityDate: 2022-10-09T23:13:29.473Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>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.</p>
  <p>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.</p>
  <p>You can also make changes via the API Explorer.</p>
  <p>&quot;The reason is that we have cases in civicrm where multiple&quot; is why i thought that merging might be all that you need</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-11T03:28:21.210Z
Answers.Text: Thank you for the fast response. Yes it was the civicrm_uf_match table that I wasn't seeing.
Answers.UserDisplayName: Simon Moseley
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-10T03:03:50.680Z
Answers.LastActivityDate: 2022-10-10T03:03:50.680Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>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</p>
  
Tags: <drupal>
Title: Drupal user link to contact
ThreadText: # Drupal user link to contact
  
  (Asked by: username_0 on 2022-10-09)
  
  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
  
  **Tags:** drupal
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2022-10-10. Score: 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
  
  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.
  
  
  ---
  
  ### Answer by username_2 on 2022-10-09. Score: 2
  
  Your question cut off at the end but it sounds like you're looking for the civicrm\_uf\_match table.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_3 on 2022-10-10. Score: 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 username_2 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
  
  > **Comments:**
  > **username_0**: Thank you for the fast response. Yes it was the civicrm_uf_match table that I wasn't seeing.  
  
  ---
  
  