Creating Drupal users made easy: for single or multiple Contacts, via Civi imports and via Webforms

Thu, 03/07/2013 - 12:32
Written by
Filed under


Thu, 03/07/2013 - 13:06

In reply to by anonymous_stub (not verified)

Just a couple of notes - if running on 4.2 you will need to be running a couple of patches. Not required on 4.3………


( or you could just use our fuzion version of 4.2.8) git clone , git checkout 4.2-d7



Fri, 03/08/2013 - 16:34

In reply to by anonymous_stub (not verified)

Nice solution Pete.

Fri, 03/08/2013 - 17:03

In reply to by anonymous_stub (not verified)

What about having your rule also delete the tag after creating the user?

not sure what to say. yes of course. i shall look in to it - or even a separate rule 'when user created remove tag xx if it exists' if doing so in the first rule interferes but i expect you are right and that it will do them in sequence.

hey pete,

this is a v. nice solution. I like the blog post calling attention to it as well. i also wonder if there is any way we can get better at collecting them somwhere. i guess the thing i am having trouble working out is what the classification would be / how we would make it easy for people to find this stuff.

seperately. we should have the first civicrm newsletter (via civimail) coming out pretty soon - it would be nice to highlight it that as well.

Mon, 03/11/2013 - 12:54

In reply to by anonymous_stub (not verified)

good work pete

Hey thanks for this, it really saved me so much hassle!

I was wondering, though... Right now the Drupal account usernames that are created are the display named of the contacts, which are formatted with spaces and makes it somewhat awkward. Is there a way to assign a username?

It would probably have to come from a custom field created by an admin upon creation of the contact, unless it were possible to format it automatically somehow... Maybe the user can create it upon signup? Hm.

Wed, 11/27/2013 - 09:09

In reply to by anonymous_stub (not verified)

Looks like a fantastic solution. In trying to test it out, I found that the attachment links are triggering an Nginx 403 error. Would be appreciative of a fix or altenative link.

Wed, 11/27/2013 - 14:33

In reply to by anonymous_stub (not verified)

crew are looking in to permissions - try again in a day or so

Wed, 11/27/2013 - 15:34

In reply to by anonymous_stub (not verified)

seems to be working now for .txt files

Sun, 02/02/2014 - 15:29

In reply to by anonymous_stub (not verified)

Hello, I am trying this solution with CiviCRM 4.4.3 and Drupal 7.26. I recive an error at <code>admin/config/workflow/rules/reaction/import</code>
that will not allow me to import the rule. Can anyone help with this? Error: <code>
Integrity check for the imported configuration failed. Error message: Missing configuration for parameter <em class="placeholder">signin</em>..

Thank you, --Tony

Mon, 02/03/2014 - 11:06

In reply to by anonymous_stub (not verified)

Hi Tony - I haven't upgraded that site from 4.2.10 yet so thanks for the warning. We expect to do a round of upgrades when 4.4.4 comes out later this week.

Mon, 02/03/2014 - 13:12

In reply to by anonymous_stub (not verified)

may have nothing to do with 4.4 though so will attach the latest



Plus, I get:

Integrity check for the imported configuration failed. Error message: Missing configuration for parameter <em class="placeholder">signin</em>

when trying to imort the rule


Sat, 09/06/2014 - 14:01

In reply to by anonymous_stub (not verified)

Hi Clive - yes there is something amiss with those files that I need to tidy up - sorry about that.

Also there have been variations to deal with whether we want the user to be logged in directly (and be sent a 'you created and account' type email) or sent an 'Admin has created you an account' type email.

See how you go with the one I just added…

Wow!  Thanks for that responsive reply.  I really didn't expect to get an answer so quickly.

I imported the "rules_entity_tag_account_create" version and everything worked for importing contacts.  The only thing is, I would prefer that the 'Admin has created you an account' version of the email went out.  I tried to edit the rules to see if there was any option for that, but it looks like its defined by $notify in the civicrm_entity module code.  I guess there is no way to change that without altering the module?

Thanks again Pete.

Sun, 09/07/2014 - 19:43

In reply to by anonymous_stub (not verified)

will try and have a look at it before end of week


(scratches head - why do your 'comments' need approving!)

I am getting the error

Integrity check for the imported configuration failed. Error message: Unknown action <em class="placeholder">civicrm_entity_action_create_user</em>..

Am i missing a step before importing the rule?

Sat, 10/11/2014 - 14:01

In reply to by anonymous_stub (not verified)

i don't know - you haven't said what steps you took ;-)

did you install civicrm_entity?

what version civicrm are you using?


I am using civi 4.4.3 and i already have civicrm_entity installed from other project but it was this version ( - I was trying to import the rule at yoursite>/admin/config/workflow/rules/reaction/import - but got that error message. I tried all rule versions posted above and none of them worked. 

Tue, 10/14/2014 - 15:08

In reply to by anonymous_stub (not verified)

ok - will try and take a look tomorrow

did you ever get a chance to look at this. cant get it to work with latest version of civicrm entity module

Sun, 02/14/2016 - 12:54

In reply to by anonymous_stub (not verified)

Hi Mike - can you be a bit more specific on what the 'it' is. I know we have this running fine on several 4.6.x sites but since there are several 'its' involved, i want to be sure I am being helpful by focussing on the right part.

Wed, 03/16/2016 - 09:24

In reply to by anonymous_stub (not verified)

I have the following message when I activate Domain Access and Domain Rules :

  • Domain module installation is incomplete. See INSTALL.txt and check your settings.php file.
  • Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration.


Where is this INSTALL.txt file ?

What should I check in settings.php file ?

I am trying to follow the procedure outlined above but when I try to add the Event to the Rule described,  the 'CiviCRM Entity Tag' does not appear in the list of possible triggers.  
I must be missing some module or configuration option, but can't see it.
Any help welcome,
Thanks, Tony


I am on Drupal 7.59,  CiviCRM 7.x-5.3.0,  CiviCRM Entity 7.x-2.1,  Rules 7.x-2.11.  


Thanks very much for this write-up.

I could not get it to work in Drupal 8, as the required Element is not available in Rules for Drupal 8. Do you have any advice on how to implement this functionality in Drupal 8?

The user_format seems to be needed now. I had to add the following to the import script to import properly:

"username_format": "first.middle.last"

Paste this just below the signin definition.

(Also added in StackExchange)