This project is not covered by Drupal’s security advisory policy.

This module supports the synchronization of first and last names and social media URLs from Drupal Commons 7.x-3.2 to CiviCRM 4.3.x (it may work with other versions, but this is what it was created and tested with).

Drupal Commons supplies additional profile fields (implemented as field entities) for First Name, Last Name, and URLs for Facebook, LinkedIn and Twitter. This module will sync a user-updated (in their Drupal Commons profile) first or last name to the first_name and last_name fields in the civicrm_contact table. If you create (in CiviCRM) custom data fields for social media URLs, it will sync those, too.

Currently, the custom id values used to update the CiviCRM fields are hardwired, but they could either be easily changed or discovered by documented (and commented out) code in the module. Updating this to be more general (and to look for the 'Bio' field which I locally disabled in my Commons install) is a simple project for the future - this will be marked by the first stable release.

As a bonus, there is a drush script to help with synchronization of Drupal users to CiviCRM contacts. My server times out after about 10K user-to-contact syncs, so this script batches the synchronize() process. For example, to sync 50K users in batches of 10K, run (from a bash shell):

for offset in 0 10000 20000 30000 40000; do
    drush civicrm-synchronize $offset 10000
done

This project sponsored by FosterClub, the national network for young people in foster care, with additional support from CivicActions.

Project information

  • Created by fen on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases