CiviCRM Integration

Last updated on
30 April 2025

You can synchronize roles between CiviCRM and Drupal to share useful information. Using the setup detailed below, you could for instance create a group of all your members in CiviCRM that you synchronize to a Member role in Drupal. You would then easily be able to set permissions in Drupal for all members based on the information updated automatically from CiviCRM.

The civicrm_group_roles and civicrm_member_roles modules are included with the CiviCRM module.

CiviCRM integration is also included in the MERCI Printable Contract and MERCI Staff submodules included with MERCI. MERCI CiviCRM Synchronization will create Activity records in CiviCRM with information about a Reservation node when a new Reservation is created.

IMPORTANT TIP: When using the civicrm_member_roles module, the New, Current, and Grace setting do not override Expired and Pending. There is another status of Canceled that can be used to when a user with one type membership let it expire and rather than renew, creates a new membership that's a different kind. If there is one expired membership, it will remove the user from the role.

While you can manually and automatically sync CiviMember_roles, prior to CiviCRM 4.2.x there is no option to do so for CiviGroup_roles which will only sync when a user logs into their Drupal account. CiviCRM 4.2.x does provide a manual synchronization tab in the CiviMember_roles module.

Note: In testing it may be found that in order for CiviGroup_roles to synchronize, the user must login and edit their profile. Simply logging in is not enough but by visiting and submitting the edit screen (even without changes) the system will synch their role to the CiviGroup they are associated with (Tested with Drupal 7.20/civiCRM 4.1.5).

EXAMPLES OF CIVIMEMBER AND CIVIGROUP ROLES SYNC

Rule ID Rule Name ("CiviMember Membership Type" --> "Drupal Role") Current Codes Expired Codes Operation
1 Producer - Executive --> Executive New, Current, Grace, Pending Expired, Cancelled, Deceased edit  delete
2 Producer - Calendar --> Calendar New, Current Expired edit  delete
Rule ID Rule Name ('CiviCRM Group' <--> 'Drupal Role') Operation
1 Staff <--> Staff edit  delete
3 Certified Edit <--> Cert Edit edit  delete
4 Certified Portable <--> Cert Portable edit  delete
5 Certified Studio <--> Cert Studio edit  delete

Help improve this page

Page status: Not set

You can: