CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Batch create user records
Pages: [1]

Author Topic: Batch create user records  (Read 5303 times)

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
Batch create user records
August 22, 2013, 02:51:06 am
Hi,

Is there any way to batch create Drupal user records from CiviCRM contacts? I know there is a feature for vice-versa but I can't seem to find anything to do it that way round.

Thanks,

Barney
--
http://whitefusemedia.com/

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Batch create user records
August 22, 2013, 05:34:39 am
Hi Barney,

There's two ways to do it - either via the Drupal User Import module, or using drush.  If you're comfortable with drush, I definitely recommend that approach!  Last time I used the drush instructions, it only took me 5-7 minutes.

http://wiki.civicrm.org/confluence/display/CRMDOC/Creating+a+Drupal+user+for+every+CiviCRM+contact
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
Re: Batch create user records
August 29, 2013, 08:16:24 am
Hi Jon, thanks for the tip. Those methods look really useful.

It looks like they create Drupal users but the users aren't linked to CiviCRM, so the custom fields exposed to Drupal don't have the same data in them. I need to create Drupal users as extensions of existing CiviCRM contacts so fields are shared between them. Do you know any way of doing that?
--
http://whitefusemedia.com/

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Batch create user records
August 29, 2013, 01:56:56 pm

The  fields are not really shared between drupal and civicrm. Civi typically injects those fields via a profile to various drupal forms (user register, my account etc)

If there is no entry in the ufmatch table, one will be created when the user logs in

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Batch create user records
August 30, 2013, 10:05:42 am
To say what Lobo said slightly differently - my understanding is that if the Drupal user's e-mail address matches a record in Civi, then the user will automatically be linked to that Civi contact when they first log in.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Barnacle

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 2
    • White Fuse Media
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.3
Re: Batch create user records
September 10, 2013, 08:48:46 am
Thanks both, I've figured out what the problem was now.

I was trying to link Civi Organizations with Drupal users. When I created a drupal user, it ignored the Organization with the same email address and created a new Individual instead. But for individuals what you've said works fine.

I'm writing a module with an admin interface for batch creation of users. Hope to release it soon!
--
http://whitefusemedia.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Batch create user records

This forum was archived on 2017-11-26.