Answers.Body: <p>Every WordPress (or other CMS) user gets a CiviCRM contact, even though not every contact corresponds to a user.  The only tool CiviCRM has for making these matches is the email address.  Once CiviCRM is installed, whenever a new WordPress user is added, CiviCRM will find or create an individual contact with that email address.</p>
  
  <p>If you have a lot of contacts with this person's email address and/or if his contact has a different email address, you may run into issues.  You also may have another user already connected to his contact record.  Pete's suggestion about the <code>civicrm_uf_match</code> table is a good one: that's the table that connects the user to the contact.</p>
  
  <p>Assuming you have a user account that is good and a contact that is good (and an Individual, not a Household or Organization), you can use the API Explorer to fix the problem.</p>
  
  <ol>
  <li><p>Get the IDs of the WordPress user and the CiviCRM contact you want to connect.  Also, get the email address that is <em>on the WordPress user record</em>.</p></li>
  <li><p>Go to Support > Developer > API Explorer</p></li>
  <li><p>For Entity, pick <code>UFMatch</code> and for Action, pick <code>get</code>.</p></li>
  <li><p>In the Parameter drop-down, pick <code>CiviCRM Contact ID</code>, leave the operator as <code>=</code>, and in the Value field, enter the Contact ID.</p></li>
  <li><p>Click Chain API Call, and in the line the appears, select <code>UFMatch</code> as the Entity and <code>delete</code> in the second column, and leave the third column as <code>{}</code>.</p></li>
  <li><p>Hit Execute.  This will delete any records connecting the good contact to any WordPress user.</p></li>
  <li><p>Now, modify the first parameter and change it to <code>CMS ID</code>, leave the <code>=</code>, and change the value to the WordPress user ID of the user you want to connect.</p></li>
  <li><p>Hit Execute.  This will delete any records connecting the good user to any CiviCRM contact.</p></li>
  <li><p>Now, go to the Action drop-down and select <code>create</code>.  This should clear out the old parameters and set up three for CMS ID, CMS Unique Identifier, and CiviCRM Contact ID.</p></li>
  <li><p>Fill those values: enter the WordPress user ID as CMS ID, the WordPress user's email address as the CMS Unique Identifier, and enter the CiviCRM contact ID as CiviCRM Contact ID.</p></li>
  <li><p>Hit Execute.  This will explicitly connect the WordPress user to the CiviCRM contact.  You can verify this by going to the contact record and seeing the user ID there next to the contact ID.</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-11T19:30:36.043Z
Answers.Text: Thanks for the help to find a fix, It worked.  
  
  But I want to know what is the reason that this issue is happening. The wordpress user I created does not have anything to do with the contact that it took on CiviCRM. Also, it only fixes the issue for this one user not for any other users I create. 
  
  For example, the current user I created and fixed is named TEST. If I go and create another user after it TEST2 (with an email that is not on the database), it doesn't create a new contact record for it, it matches it with a contact that does not have the same email or name.
Answers.UserDisplayName: Ali A
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-11T19:35:11.993Z
Answers.Text: That's really crazy, and unfortunately, I can't help you with that.  It's definitely not the appropriate behavior, but I can't tell you whether it's a bug in CiviCRM, WordPress, or another of your plugins that may be interfering.
Answers.UserDisplayName: Andie Hunt
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-11T21:39:07.483Z
Answers.Text: You may need to edit your original question and detail your Dedupe/Merge rules
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-11T22:01:06.530Z
Answers.Text: Pete's on to something.  I had always assumed it just matched on email (because nothing else is necessarily available), but it looks like it sends the `$_POST` array to the duplicate contact finder and then only looks for contacts based upon email if none matches based on the Unsupervised dedupe rule.  Two possibilities: either your Unsupervised dedupe rule is too loose, matching people somewhat at random, or your page request is posting values that the dedupe finder is interpreting to create funny matches.
Answers.UserDisplayName: Andie Hunt
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-11T16:37:02.167Z
Answers.LastActivityDate: 2018-06-11T16:37:02.167Z
Answers.UserDisplayName: Andie Hunt
Body: <p>I have a WordPress website with large CiviCRM database. For some reason, CiviCRM is reading one of my Administrators as a contact name (not matching his name) and every time I try to delete him and make him a new user, it matches him to another contact (not his). How can I find a fix for this issue?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-08T20:43:41.523Z
Comments.Text: not sure about WP but with a drupal set up there is a uf_match table that joins the civi contact to the cms user. if you can access that table you may be able to correct the miswiring of the Admin
Comments.UserDisplayName: petednz - fuzion
Tags: <wordpress>
Title: CiviCRM Reading Contacts name as admin
ThreadText: # CiviCRM Reading Contacts name as admin
  
  (Asked by: username_0 on 2018-06-08)
  
  I have a WordPress website with large CiviCRM database. For some reason, CiviCRM is reading one of my Administrators as a contact name (not matching his name) and every time I try to delete him and make him a new user, it matches him to another contact (not his). How can I find a fix for this issue?
  
  **Tags:** wordpress
  
  > **Comments:**
  > **username_1**: not sure about WP but with a drupal set up there is a uf_match table that joins the civi contact to the cms user. if you can access that table you may be able to correct the miswiring of the Admin  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-06-11. Score: 4
  
  Every WordPress (or other CMS) user gets a CiviCRM contact, even though not every contact corresponds to a user. The only tool CiviCRM has for making these matches is the email address. Once CiviCRM is installed, whenever a new WordPress user is added, CiviCRM will find or create an individual contact with that email address.
  
  If you have a lot of contacts with this person's email address and/or if his contact has a different email address, you may run into issues. You also may have another user already connected to his contact record. Pete's suggestion about the `civicrm_uf_match` table is a good one: that's the table that connects the user to the contact.
  
  Assuming you have a user account that is good and a contact that is good (and an Individual, not a Household or Organization), you can use the API Explorer to fix the problem.
  
  1. Get the IDs of the WordPress user and the CiviCRM contact you want to connect. Also, get the email address that is *on the WordPress user record*.
  2. Go to Support > Developer > API Explorer
  3. For Entity, pick `UFMatch` and for Action, pick `get`.
  4. In the Parameter drop-down, pick `CiviCRM Contact ID`, leave the operator as `=`, and in the Value field, enter the Contact ID.
  5. Click Chain API Call, and in the line the appears, select `UFMatch` as the Entity and `delete` in the second column, and leave the third column as `{}`.
  6. Hit Execute. This will delete any records connecting the good contact to any WordPress user.
  7. Now, modify the first parameter and change it to `CMS ID`, leave the `=`, and change the value to the WordPress user ID of the user you want to connect.
  8. Hit Execute. This will delete any records connecting the good user to any CiviCRM contact.
  9. Now, go to the Action drop-down and select `create`. This should clear out the old parameters and set up three for CMS ID, CMS Unique Identifier, and CiviCRM Contact ID.
  10. Fill those values: enter the WordPress user ID as CMS ID, the WordPress user's email address as the CMS Unique Identifier, and enter the CiviCRM contact ID as CiviCRM Contact ID.
  11. Hit Execute. This will explicitly connect the WordPress user to the CiviCRM contact. You can verify this by going to the contact record and seeing the user ID there next to the contact ID.
  
  > **Comments:**
  > **username_0**: Thanks for the help to find a fix, It worked.    But I want to know what is the reason that this issue is happening. The wordpress user I created does not have anything to do with the contact that it took on CiviCRM. Also, it only fixes the issue for this one user not for any other users I create.   For example, the current user I created and fixed is named TEST. If I go and create another user after it TEST2 (with an email that is not on the database), it doesn't create a new contact record for it, it matches it with a contact that does not have the same email or name.  
  > **username_2**: That's really crazy, and unfortunately, I can't help you with that.  It's definitely not the appropriate behavior, but I can't tell you whether it's a bug in CiviCRM, WordPress, or another of your plugins that may be interfering.  
  > **username_1**: You may need to edit your original question and detail your Dedupe/Merge rules  
  > **username_2**: Pete's on to something.  I had always assumed it just matched on email (because nothing else is necessarily available), but it looks like it sends the `$_POST` array to the duplicate contact finder and then only looks for contacts based upon email if none matches based on the Unsupervised dedupe rule.  Two possibilities: either your Unsupervised dedupe rule is too loose, matching people somewhat at random, or your page request is posting values that the dedupe finder is interpreting to create funny matches.  
  
  ---
  
  