This module hooks into User Merge to add support for merging user information related to CiviCRM's user integration. This includes but not limited to:

  • The User's contact entry
  • Membership Information
  • Activity
  • Groups
  • Tags
  • Contributions
  • Pledges
  • Relationships
  • Notes

Dependencies

CiviCRM
Only tested 4.3.0 - 4.3.3
User Merge
7.x-1.x-dev 2012-Jul-16

How It Works

By hooking in to the User Merge interface, we can figure out what contacts need to be merged together using the UF Match record. Normal use of the User Merge Module has not changed at all.

After we find out the two contacts, we treat them as duplicate contacts, sending them through the same process you would go through if an Administrator was trying to merge two contacts. The only difference here is you do not get to choose which information to keep.

The information is merged "Agressively". That means no rules, just merge. This favors the user-to-keep's contact information unless it's empty. However, the related information (memberships, groups, activity, etc...) the user-to-delete owns will be unioned with the information that the user-to-keep owns. Many batch dedup scripts are written to follow this same pattern.

In the case that the user-to-delete doesn't have a CiviCRM contact entry, User Merge continues on as if this module wasn't there.

In the case that the user-to-keep doesn't have a CiviCRM contact entry, but the user-to-delete does, the contact changes ownership with no union of information.

You can see more technical information about how this works via CiviCRM's GitHub repo by diving into the code. The contact.merge API call is currently undocumented with examples.

This module is sponsored by Promet Source Inc.

Project information

Releases