CRM-6861 Make-it-Happen - CMS User merge on Dedupe as sponsored by the community

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.3.alpha, 3.3.3
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Include a row in the Merge screen to display "$cms User" (e.g. Drupal or Joomla User) info if one or both of the contacts is linked to a user record in uf_match table.

      1. If contact has a user record, display username and user_id in the row with link to view user record if logged in user has permission to view users:

      "Drupal User: adam foo; user id: 121"

      2. Preprocess should determine whether 0, 1 or both contacts have associated user records - and set a status (warning) message above the user info display row for the "both" condition. Status message as follows:

      "There are $ufFramework user accounts associated with both the original and duplicate contacts. If you continue with the merge, the user record associated with the duplicate contact will not be deleted, but will be un-linked from the associated contact record (which will be deleted). If that user logs in again, a new contact record will be created for them."

      NOTE: We need to verify the behavior for the soft-delete of a contact associated with a drupal user (on merge, and when that user logs in again). The message above may need to be modified if soft-delete is enabled. However, I think the right behavior is that is_deleted contacts are ignored for user -> contact synch.

      3. Post-process: If the user account was associated with the duplicate contact AND the 'move' checkbox is checked - then update the uf_match row replacing the dupe contact id with the "original" contact id. If both contacts have an entry in uf_match, then delete the uf_match row which references the duplicate contact.

        Attachments

          Activity

          [CRM-6861] Make-it-Happen - CMS User merge on Dedupe as sponsored by the community
          Eileen McNaughton added a comment -

          http://wiki.civicrm.org/confluence/display/CRM/DeDupe+Optimization+Project+for+v3.3

          I guess it's ideally that 1) you will be able to see CMS user IDs when merging / deduping & 2 the CMS user ID could be optionally deleted - does that make sense

          Eileen McNaughton added a comment -

          I guess the question is whether Drupal allows you to do anything further -e.g. copy roles across

          Peter Davis added a comment -

          so working from simplest to more complex

          • on merge page, provide the UID for those contacts that have a Drupal Account

          if only one has a Drupal account then currently the contacts can be flipped so that the one with a UID is kept

          would be better if there is only one Drupal account, that that civicrm record, by default, becomes the record to keep

          if both have a Drupal account then it gets much more complex and i suspect the person will have to go and look at both Drupal accounts since there are all the issues of

          • authorship
          • Drupal User profile data
          • roles
          • OG membership etc

          I note that there is a drupal User Merge module that may be helpful in such situations though it doesn't (yet) cover 'profile' data http://drupal.org/project/usermerge

          So I doubt it makes sense to try and do any Drupal User record merging in the civicrm merge process, but at least since we have 'soft delete' now it does mean that the unwanted record is still around so the Drupal account is not, at that point, orphaned.

          So the person merging could go ahead, merge 2 civicrm records if both have a Drupal record, and then deal with the Drupal side of things afterwards.

          Not sure that has helped a great deal.

          Rahul Bile added a comment -

          checked in r-30149.

          David Greenberg added a comment -

          Found two exceptions related to handling merge of contacts with linked user record(s):

          1. Spec in this issue indicates that the User Name should be displayed in the merge screen for any contacts that have linked user record (and that name should link to view user record). This was not happening in my tests on 3.3.2.

          2. The user account merge WARNING was supposed to be displayed only if BOTH accounts have linked user records (since in the case on only one, the admin can choose to retain the linkage during merge). In my test, the duplicate record did NOT have an associated user account, but the warning is still being displayed.

          Screenshot of this test case attached.

          Sushant Paste added a comment -

          Tested r31766.

            People

            • Assignee:
              Sushant Paste
              Reporter:
              Eileen McNaughton

              Dates

              • Created:
                Updated:
                Resolved: