Answers.Body: <p>It's on purpose that it removes the link to the user when you delete. It was added years ago here: <a href="https://github.com/civicrm/civicrm-svn/commit/3d9843c5912cb9d77e557b4a8cd4ef711f2cdcbb" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-svn/commit/3d9843c5912cb9d77e557b4a8cd4ef711f2cdcbb</a></p>
  
  <p>and seems related to deduping <a href="https://issues.civicrm.org/jira/browse/CRM-6861" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-6861</a></p>
  
  <p>But yes Civi will reattach them once you do something that triggers the matching which is usually on email address, i.e. if the drupal user and the contact record have the same email.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-05T17:35:47.513Z
Answers.LastActivityDate: 2019-12-05T17:35:47.513Z
Answers.UserDisplayName: Demerit
Body: <p>One of our administrators mistakenly deleted three contacts while trying to remove them from a distribution list. I restored the three contacts from trash, but didn't notice that the three restored contacts now no longer showed a Drupal User ID next their Contact ID in the CiviCRM summary screen for the contact.</p>
  
  <p>The users were unable to sign up for events (you have to be have a membership to access signup), and when we realized this, I found each User, clicked the Edit button, then I clicked the "LMGA Member Info" button in the upper right of the Drupal User Edit screen. Just opening that tab showed the CiviCRM info for this member, and then I found that the CiviCRM summary screen for this user now showed Contact ID/User ID. The link seemed to have been restored by Drupal accessing the CiviCRM tables. </p>
  
  <p>I think all is well now, but I'm unsure of what actually happened and why. Can some kind soul please enlighten me?</p>
  
  <p>Thanks,
  Rick </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-05T17:06:41.403Z
Comments.Text: Oh, and software versions: Drupal 7.67 CiviCRM 5.13.4
Comments.UserDisplayName: Rick Cunningham
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-06T08:22:05.470Z
Comments.Text: Not a direct answer but maybe useful: You can re-sync all CMS users with CiviCRM contacts on this page: /civicrm/admin/synchUser?reset=1
  
  Also, if you have restored the contact and the user signs in again, the contact and user should be connected again, provided CiviCRM's matching rule recognizes them.
Comments.UserDisplayName: Fabian
Tags: <drupal><civimember>
Title: Deleting and Restoring a Contact detaches Contact from User
ThreadText: # Deleting and Restoring a Contact detaches Contact from User
  
  (Asked by: username_0 on 2019-12-05)
  
  One of our administrators mistakenly deleted three contacts while trying to remove them from a distribution list. I restored the three contacts from trash, but didn't notice that the three restored contacts now no longer showed a Drupal User ID next their Contact ID in the CiviCRM summary screen for the contact.
  
  The users were unable to sign up for events (you have to be have a membership to access signup), and when we realized this, I found each User, clicked the Edit button, then I clicked the "LMGA Member Info" button in the upper right of the Drupal User Edit screen. Just opening that tab showed the CiviCRM info for this member, and then I found that the CiviCRM summary screen for this user now showed Contact ID/User ID. The link seemed to have been restored by Drupal accessing the CiviCRM tables.
  
  I think all is well now, but I'm unsure of what actually happened and why. Can some kind soul please enlighten me?
  
  Thanks,
  Rick
  
  **Tags:** drupal, civimember
  
  > **Comments:**
  > **username_0**: Oh, and software versions: Drupal 7.67 CiviCRM 5.13.4  
  > **username_1**: Not a direct answer but maybe useful: You can re-sync all CMS users with CiviCRM contacts on this page: /civicrm/admin/synchUser?reset=1  Also, if you have restored the contact and the user signs in again, the contact and user should be connected again, provided CiviCRM's matching rule recognizes them.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-12-05. Score: 2 | Accepted answer
  
  It's on purpose that it removes the link to the user when you delete. It was added years ago here: <https://github.com/civicrm/civicrm-svn/commit/3d9843c5912cb9d77e557b4a8cd4ef711f2cdcbb>
  
  and seems related to deduping <https://issues.civicrm.org/jira/browse/CRM-6861>
  
  But yes Civi will reattach them once you do something that triggers the matching which is usually on email address, i.e. if the drupal user and the contact record have the same email.
  
  
  ---
  
  