Of all the three CMS that integrate with CiviCRM, Drupal has received the most attention, and offers the most options when it comes to integration. This is in part due to the fact that the Drupal community is largely a developer community.
When you create a new Drupal site User and CiviCRM is installed a corresponding CiviCRM Contact is also created. Both users and contacts have a separate identification or index number.
See also the permissions and access control chapter in initial set up for a general discussion of access control.
Your Drupal website allows you to create a series of Roles. Your website administrator give roles to site users and grant each role the permission to perform a certain series of tasks (view, edit, delete, and administer contacts) or access a certain set of information (CiviCRM Contacts, CiviMail, CiviEvents, Drupal Users, specific content types, etc.)
For more information on Drupal Roles, please read the documentation on Drupal Roles at Drupal.org:
Drupal permission settings allow you to decide what tasks a specific Role can perform or what information a certain Role has access to. Drupal permissions determine how much access a certain type of user has to configure modules, view, create, edit, or change types of content, users, or CiviCRM Contact information.
For more information on Drupal Permission settings, please read the documentation on Drupal Permissions at Drupal.org:
User: Access and management settings http://drupal.org/documentation/modules/user
Assigning permissions and users to roles http://drupal.org/node/22278
Adjusting permissions after adding modules http://drupal.org/node/22279
Drupal roles are global and will override relevant access controls (see chapter Initial Setup> Permissions and Access Control) setup in CiviCRM. For example you can setup Access Control in CiviCRM to restrict access to contacts but if the Drupal permission 'Access All Contacts' is set anyone with that role will be able to see all contacts regardless.
There are several Drupal Modules that determine what Drupal Roles have access to which types of content in your Drupal website. This can be based on Drupal taxonomies, by selecting access to specific nodes, settings on a specific views, pages, or panels, or based on certain contexts or rules. A few of the most common modules used for controlling access to content or include options for controlling content based on Drupal Roles are:
Views is a powerful Drupal module that allows you to display website content e.g. a list of latest news for the home page. CiviCRM integrates with Drupal Views and allows CiviCRM data to be shown on your website. For instance, if you wanted to create a page called 'Partner Organizations' and display it publicly you could:
This is just a simple example, the possibilities of Drupal Views and CiviCRM are far reaching.
If you have your Drupal and CiviCRM in separate databases adding CiviCRM support to Views takes a small bit of configuration. Views must be told where to look for CiviCRM data. Administer > System Settings > CMS Database Integration shows some code that must be copied and pasted into the Drupal settings.php file after (but not replacing) the existing database connection code. If you have trouble consider asking for help in the forums or hiring a consultant. If you are using Custom Data sets in CiviCRM, anytime you add a new data set (not just a field) you must repeat this process.
Views are located in the Structure section of the Drupal administrative menu. When you create a View, give it a name and select what kind of data you wish to show.
Generally speaking if your view is focused on Contacts (which most are) you will select Show: CiviCRM Contacts. If you wish to display details about other CiviCRM data such as events, relationships, contributions or activities there are additional options that might provide more data fields for those types.
After the View is created, edit the fields, filters, display and other configurations to show the data exactly how you'd prefer. Views does take some experimentation and/or training to get it right. Feel free to ask questions on the forums or hire a consultant if you become stuck.
This is a sample configuration using Views 3 in a Drupal 7 environment. Your View will probably be slightly different, but this gives you some examples to get started with.
When thinking about website integration with Drupal, it is important to understand the concept of Drupal modules. It might help you to think of a module as an application which provides a certain bit of functionality. For example the calendar module allows you to display calendars on your website.
The Drupal distribution of CiviCRM comes with a number of Drupal modules which give you the ability to integrate CiviCRM with Drupal in various different ways. This chapter outlines CiviCRM's Webform integration module and then looks at the Drupal integration modules that come with CiviCRM.
Just as Views can output data in virtually any way imaginable, this module allows you to have data input exactly the way you want.The webform CiviCRM integration is extensive and offers many different options for things that can happen as part of the form submission.
You can create and update contacts, group subscriptions, tags, relationships, cases, custom data, activities, memberships, event participants and take payments online via webforms. They can offer greater flexibility when compared to standard CiviCRM Profiles.
For example, you can create a form which adds a family with all relationships / you can add a new member form with a multi-page form which includes question logic / you can create a new activity when someone submits the form. Webform CiviCRM has extensive online documentation which you should read to make the most out of its functionality.
For more information see: http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration
The Organic Groups CiviCRM module (http://drupal.org/project/og_civicrm) integrates Organic Groups from a Drupal site with CiviCRM groups. This is useful for groups that require Organic Group functionality on their website but also need to be tracked within CiviCRM. Once an Organic Group of Drupal users are integrated into CiviCRM, the Drupal group can be used for mailings, tracking address information, tracking activities or anything else normally done with CiviCRM contacts.
Once the Organic Groups CiviCRM module is installed and enabled in Drupal it automatically creates two CiviCRM groups for each existing Drupal Organic Group:
The groups are synchronised one way only, from the Drupal Organic Groups to CiviCRM groups. When a new user is added to or signs up for an Organic Group, they are automatically added to the corresponding CiviCRM group. If they leave the Organic Group then they are removed from the CiviCRM group. If an Organic Group is deleted, the CiviCRM group is also deleted. However, the reverse of each of this situations is not true; a contact added to the CiviCRM group will not appear in the Drupal Organic Group, a contact removed from the CiviCRM group will still remain in the Drupal Organic Group, and if you delete the CiviCRM group, the Drupal Organic Group will still remain. Therefore, this integration is meant to be used when you administer the group from the Drupal side.
The CiviGroup Roles Sync module allows administrators of Drupal Websites to streamline the user experience for donors and staff. The CiviGroup Roles Sync module allows you to:
You should spend some time assessing the different ways that different sorts of users interact with your website, being sure to ask yourself whether or not the user experience is dependent on specific organized groups, teams, committees, or task forces or on whether or not a contact meets a specific set of criteria, or if you should apply roles to users manually.
In essence, it allows you to synchronize Drupal users that have a certain role with CiviCRM contacts in a certain group.
Before using CiviGroup Roles Sync module you should have the following prepared:
When determining what Groups and what Drupal Roles you should create it is important to remember that multiple Group Types may grant the same Drupal Role and each Group can be used to grant multiple Drupal roles.
You should enable the module from the Drupal module administration screen.
Navigate to the CiviGroup Role Sync configuration screen.
Click on Add Association Rule.
Under CiviCRM Group select the Group that you want a user to have in order to be granted a specific Drupal Role.
You can always edit or delete existing association rules from the same configuration screen.
The CiviMember Roles Sync module allows administrators of Drupal Websites to streamline the user experience for organization members. The CiviMember Roles Sync module allows you to.
The Retail Baker's Association of America (RBA) connects bakery suppliers and owners across the country to foster a community that encourages exchange of business and industry information, networking, mentoring, and business opportunities, and establish industry standards through certification, research, and school programs.
Visitors to their website fall into three different user experiences:
In order to save their staff from having to grant the Drupal Role "Active Member" to a user each time he or she renews his or her membership and then remove the "Active Member" role if that user cancels his or her membership or allows his or her membership to expire, RBA uses CiviMember Role Sync to grant the "Active Member" role to any user who is either a new or current member and any user who's membership has fallen into the grace period. Now when a user registers or renews his or her membership he or she will automatically be granted access to RBA's Member-Only web content.
This section covers what you need to think about before beginning to work with CiviMember Role Sync.
You should spend some time assessing the different ways that different sorts of users interact with your website, being sure to ask yourself whether or not the use case is dependent on your membership structure or dependent on the organization of committees, teams, and contacts meeting a specific set of criteria, or if your workflow simply does not warrant the use of CiviMember Role Sync at all.
You should have a full understanding of CiviCRM Membership Types and CiviCRM Membership Statuses before you begin working with the CiviMember Role Sync module. You can learn more about the CiviMember component by reviewing the MEMBERSHIP chapter.
Before using CiviMember Roles Sync module you should have the following prepared:
When determining what Membership Types and what Drupal Roles you should create it is important to remember that multiple Membership Types may grant the same Drupal Role and each Membership Type can be used to grant multiple Drupal roles.
For example: The Retail Bakers Association of America has five different membership types: Corporate Sponsor, Bakery, Individual, Student, and Retired Bakery. Having any one of the five Membership Types will grant a user the "Active Member" Drupal Role that gives access to the member-only content. In addition to this, users with the Corporate Sponsor Membership Type should have access to additional exclusive content. RBA decides calls the Drupal role used to access this additional exclusive content "Corporate Member" and user with the Corporate Sponsor Membership Type will be granted the "Corporate Member" role in addition to the "Active Member" role.
To enable the CiviMember Roles Sync Module navigate to your list of installed Drupal modules.
Find the Module CiviMember Roles Sync and check the box to the left of the module's name.
Click on Save Configuration.
Navigate to the CiviMember Role Sync configuration screen.
Click on Add Association Rule.
Under Select a CiviMember Membership Type select the Membership Type that you want a user to have in order to be granted a specific Drupal Role.
Under Select a Drupal Role select the Drupal Role that should be granted. Example: RBA wants any user with a Current Bakery Membership Type to be granted the "Active Member" role, so the RBA staff creates a new Association Rule and selects Bakery under Select a CiviMember Membership Type and selects "Active Member" under Select a Drupal Role.
Under Current Status select the Membership Status that a user should have to be granted your selected Drupal Role. Example: RBA wants to grant any user who has a Membership Status of either New, Current, or Grace access to the member-only website content, so the RBA staff checks the boxes next to those three Membership Statuses.
Under Expired Status select the Membership Status that will revoke the Drupal Role from the user. Example: RBA wants to make sure that any user who's membership expires or cancels their membership has their access to the member-only website content revoked, so the RBA staff checks the boxes next to Expired and Canceled.
Click on Add Association Rule when you are finished configuring your new association rule.
The page will reload, and you should see the message "Your Association Rule has been added."
Repeat steps 1-8 to add all necessary association rules for your organization. Once you have finished adding all of your association rules, move on to step 10.
Click on the tab Manually Synchronize
Click on Synchronize CiviMember Membership Types to Drupal Roles Now. This will put your new CiviMember Role Sync Association Role immediately into effect.
You can always edit or delete existing association rules.
To edit or delete an existing Association Rule, Navigate to the CiviMember Role Sync configuration screen.
You should now see a list of all existing CiviMember Role Sync Association Rules. If not, click on List Association Rule(s) tab.
Edit an Existing Association Rule
Delete an Association Rule
Find the Association Rule you want to remove and click on delete for that Association Rule.
Your association rule will be deleted. You will not need to confirm deletion.
You can select several different options for when synchronization should occur by navigating to the CiviMember Role Sync Configure screen.
Be sure to click Save Configuration after making any changes.