Use Drupal webforms to create new users with the CMS User extension

Veröffentlicht
2021-12-20 09:05
Written by
mark.armstrong - member of the CiviCRM community - view blog guidelines

People are at the heart of any organization, whether it’s volunteers, students, or clients, and getting the most out of your technology can help organize them to better accomplish your goals.

Drupal websites have leveraged the power of webforms through the CiviCRM Webform module to gather user information, for scheduling and other automated jobs. The one thing missing — user account creating.

Seeing this, Skvare developers created a new CiviCRM extension that allows new users to create a Drupal user account through a CiviCRM Webform, automatically assign Drupal user roles based on configurations and create a CiviCRM contact records with tags or groups assign.

The CiviCRM CMS User Extension works seamlessly with Drupal webforms, bulk import of CiviCRM contacts, or creating new contacts in CiviCRM to create Drupal user accounts when they do not already exist. This allows site administrators to create new Drupal users and CiviCRM contacts through CiviCRM or new volunteers to complete a single webform and create a Drupal user account at the same time.

HOW IT WORKS

Once installed, the CiviCRM CMS User Extension is configured under Administer - System Settings - CMS User Settings. The configuration window lets site builders user tokens to automatically generate Drupal Usernames based on information collected through CiviCRM Webforms, provides options to notify the user of the new Drupal Account through the Drupal People Settings, assigns roles to the new user based on configured Drupal roles and use groups or tags to determine which new users get new Drupal accounts.

The Drupal User Fields portion of the CMS User Settings also lets site builder configure any required fields in the Drupal User settings. For example, if a new user's address is a required Drupal User field, tokens can be used to collect the address in the CiviCRM webform and passed to the Drupal account. In this way, new users can be created with any unique field combination.

Using Tags or Groups is a good way to sort CiviCRM contact records and, when assigned a tag or group through a CiviCRM webform, can be used to determine which users get Drupal User accounts. For websites with multiple webforms for different users, only the users completing the webform and assigned to the configured tag or group will have a Drupal account created while not created accounts for users completing webforms and not assigned to that tag or group.

A second field for tags or groups also allows site builders to remove the tag or group assigned by the webform and assign a new tag or group to the new user. This can allow for new users to be easily found via search in CiviCRM so additional actions can be taken or communications sent.

Learn more about how Skvare’s team of Drupal and CiviCRM experts help organizations better deliver on their missions when their technology can do more.

Filed under

Comments

This is amazing - I had to deal with this just three days ago, and had to patch Rules and it was still a bit buggy. I'll be testing this immediately.

This looks awesome. Been cobbling together drupal rules and tags and sync user role settings at different points over the years.

Looking forward to get to play with this new toy!