6

I am currently using a Drupal 7.35 CiviCRM 4.4.14 build for a new website. I have all of contacts set up, with their relationships and memberships, and all the rules in place so that as it changes in Civi it pushed the changes on Drupal.

What I do not understand however, is how to migrate the 1000 or so contacts in Civi to create their log-ins in Drupal.

Some webpages suggest exporting to CSV and importing from CSV; and I have not even started looking into Drush.... surely there must be an easier way?

6

I've done this a few times using the User Import module. You just get a contact listing of all the contacts in CiviCRM that need an account (for example, all of the contacts in a particular group or those that are returned from a particular search) and then do a simple CSV export of the relevant information.

You could export the email address, first name, last name, and then edit the list in a spreadsheet if you need to generate custom usernames or passwords. The module will allow you to construct usernames on the fly by using multiple fields. You can optionally abbreviate them as well, so you could do a username as any of the following without any extra editing of the CSV data:

  • FirstLast
  • FLast
  • FirstL

The module will also allow you to send the welcome email (or a custom welcome email), assign roles, and more.

  • I am just installing the User Import module now; so hopefully that might be right. – Darren Whittenham-Gray Apr 1 '15 at 16:33
  • 1
    You beat me to it by 7 minutes. I follow this method. I assign usernames and passwords this way and send the welcome if necessary. Then I go back to CiviCRM -> Administer -> Users and Permissions -> Synchronize users to contacts to ensure that CiviCRM has a relationship between all of the contact records and the Drupal user accounts. CiviCRM will create a relationship between CiviCRM and Drupal in the civicrm_uf_match table. – Andrew Wasson Apr 1 '15 at 16:38
  • Well you know what... it appears to be working. Many thanks for your support of the module! – Darren Whittenham-Gray Apr 1 '15 at 17:29
4

I've had good results using Drupal rules. The recipe is set in detail here by Pete from Fuzion in NZ - thanks Pete: https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and

I guess I would first be sure that you need to create user accounts for all your users all at the same time. Using this recipe, you can manage when accounts get created.

  • 1
    Hi Graham, To be honest, yes it would be a very good idea to do them altogether, although they can be split into distinct groups if we need to. I did have a look at Pete's blog post, but it was basically over my head when I was assured that it could be done via a simple method. Once this bulk import is done, everything is in place for new members to register and it to do what it does without intervention. – Darren Whittenham-Gray Apr 1 '15 at 16:21
  • The User Import module looks like a better fit in your use case. – Graham Apr 2 '15 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.