Answers.Body: <p>These are stored in the <code>civicrm_uf_match</code> table.</p>
  <p>There are a bunch of different ways that the Wordpress user id could have been created. You can create Wordpress users with a profile, you can sync your Wordpress users to CiviCRM (Admin &gt; Users &amp; Permissions &gt; Synchronize Users to Contacts), through extensions like CMS User, through webforms on Drupal, etc.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-07T17:55:00.920Z
Answers.Text: Thanks for the details. Do you know how this table was built? The reason is we have moved to a new server and we have copied this table over to the new server as well but we HAVEN'T copied the wp_users in Wordpress from old server to new one, is it too, late to copy now? we don't have much users, we can delete all users in the Wordpress (new server) and re-create back the users based on the sequence in the old server, will it work? Thanks
Answers.UserDisplayName: Learn CiviCRM
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-07T18:59:19.877Z
Answers.Text: if you have not copied over WP users, and if you don't intend to, then I suggest you truncate that table as otherwise it will be wrongly connecting users to contacts, and hence if someone logs in, and fills in a form it will overwrite data.
  if you can still copy over your WP users then, unless changes have already been made by folk logging in and 'correcting' data, then you should be good to go
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-07T19:00:14.217Z
Answers.Text: if you don't have many WP users, and you weren't planning on copying them across, then why not truncate the uf_match table and use the option Lars explains: sync your Wordpress users to CiviCRM (Admin > Users & Permissions > Synchronize Users to Contacts)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-07T19:23:50.713Z
Answers.Text: What Pete said! It will match by email, so as long as the users have the same email as contacts, it should pick up the right contacts, if not you might have to do some merging.
Answers.UserDisplayName: Lars SG
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-07T21:19:21.097Z
Answers.Text: Many Thanks to both of you!
Answers.UserDisplayName: Learn CiviCRM
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-06T21:44:35.567Z
Answers.LastActivityDate: 2023-09-06T21:44:35.567Z
Answers.UserDisplayName: Lars SG
Body: <p>In the contact screen, we have a field Contact ID / User ID, after investigation we found out the user id is the user id defined in Wordpress, for example 10145 / 13. In other words, the contact with ID 10145 is also an user defined in Wordpress with user id = 13. We found out by looking at the wp_users table. Can someone let us know how this Contact ID / User ID was created and it was stored in which table? Thanks</p>
  <p><a href="https://i.sstatic.net/bZHBC.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bZHBC.png" alt="enter image description here" /></a></p>
  
Tags: <contact-layout-editor>
Title: Contact ID / User ID in Contact screen
ThreadText: # Contact ID / User ID in Contact screen
  
  (Asked by: username_0 on 2023-09-06)
  
  In the contact screen, we have a field Contact ID / User ID, after investigation we found out the user id is the user id defined in Wordpress, for example 10145 / 13. In other words, the contact with ID 10145 is also an user defined in Wordpress with user id = 13. We found out by looking at the wp\_users table. Can someone let us know how this Contact ID / User ID was created and it was stored in which table? Thanks
  
  [![enter image description here](https://i.sstatic.net/bZHBC.png)](https://i.sstatic.net/bZHBC.png)
  
  **Tags:** contact-layout-editor
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-09-06. Score: 3
  
  These are stored in the `civicrm_uf_match` table.
  
  There are a bunch of different ways that the Wordpress user id could have been created. You can create Wordpress users with a profile, you can sync your Wordpress users to username_0 (Admin > Users & Permissions > Synchronize Users to Contacts), through extensions like CMS User, through webforms on Drupal, etc.
  
  > **Comments:**
  > **username_0**: Thanks for the details. Do you know how this table was built? The reason is we have moved to a new server and we have copied this table over to the new server as well but we HAVEN'T copied the wp_users in Wordpress from old server to new one, is it too, late to copy now? we don't have much users, we can delete all users in the Wordpress (new server) and re-create back the users based on the sequence in the old server, will it work? Thanks  
  > **username_2**: if you have not copied over WP users, and if you don't intend to, then I suggest you truncate that table as otherwise it will be wrongly connecting users to contacts, and hence if someone logs in, and fills in a form it will overwrite data. if you can still copy over your WP users then, unless changes have already been made by folk logging in and 'correcting' data, then you should be good to go  
  > **username_2**: if you don't have many WP users, and you weren't planning on copying them across, then why not truncate the uf_match table and use the option username_1 explains: sync your Wordpress users to username_0 (Admin > Users & Permissions > Synchronize Users to Contacts)  
  > **username_1**: What Pete said! It will match by email, so as long as the users have the same email as contacts, it should pick up the right contacts, if not you might have to do some merging.  
  > **username_0**: Many Thanks to both of you!  
  
  ---
  
  