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 »
  • Using Import (Moderator: Yashodha Chaku) »
  • Exporting users from CiviCRM to Drupal
Pages: [1]

Author Topic: Exporting users from CiviCRM to Drupal  (Read 4314 times)

Muhammad Asim Dewan

  • Guest
Exporting users from CiviCRM to Drupal
May 07, 2009, 04:11:23 am
HI,

Dears!

I want that when I am logged in as drupal admin when i create new individual in CiviCRM then that invidiual also become user of drupal automatically and an email will also sent to that individual with: username and password for that individual.

Please Help me ... I am trying it since 2 days.

I will be very thankfull to you community..

Take Care !

Bye.

Jason W

  • I post frequently
  • ***
  • Posts: 197
  • Karma: 12
  • jason@civitrainingtutorials.com
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.x.x
Re: Exporting users from CiviCRM to Drupal
September 26, 2012, 11:08:37 am

Hello Muhammad,

I worked on this for around an hour and a half myself to no avail. I finally decided I would look in the online documentation to see if they had an answer. I'm not certain what version of CiviCRM or Drupal you are using, but this document seems to have answers that span from CiviCRM 1.2 to current.

Good luck!

Cheers,
Jason
civiTrainingTutorials
"Helping You Help Others"

britebyte

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 2
  • CiviCRM version: Several 3.4+, 4.1+
  • CMS version: Drupal 6, Drupal7
  • MySQL version: Several 5.1+
  • PHP version: Several 5.2+
Re: Exporting users from CiviCRM to Drupal
September 26, 2012, 05:52:32 pm
From what I have tested it seems that you have 3 options in the Core product to create a Civi contact and a Drupal user at the same time.
Two involve using profiles and allowing users to register themselves on your Drupal site. Neither of these is actually done from the the Civi backend but the user is created in one step

Create a profile with all the fields you would normally add to a new user and check the "Drupal User Registration" Checkbox on that profile.
    Go to yoursite.com/user and register the user instead of using the CiviCRM Admin backend.
    * DRAWBACK: All users will need to fill  out the form fields if they are required or may be confused by seeing them on the user registration even if they are not required.
Create a profile with the all the fields and select the radio button: "Account creation required" in the advanced settings.
   Go to that profile yoursite.com/civicrm/profile/create&gid=xx where xx is the id of the profile to add your suers.

The third is to create your user and then once you are viewing their contact page use the actions menu and in the third column to the right you will find the "Create User Account" Menu link. This will create the Drupal user after you fill in the username and password fields. This is actually two steps but is still fairly quick.

Pamela

  • I’m new here
  • *
  • Posts: 23
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: WordPress 4.1
  • MySQL version: 5.5.40
  • PHP version: 5.3.27
Re: Exporting users from CiviCRM to Drupal
November 08, 2012, 11:00:07 am
I'm a bit new to Drupal but if it's anything like WordPress, this should work:

1) Export all your contacts from CiviCRM to a CSV.
2) Format the CSV accordingly--User Name as email address, email address as email address, Password as something you randomly generate
3) Import this CSV into Drupal as users.

As I said, I'm new to Drupal, so it may be possible that you can't import users from CSV files. If this is the case, I would be surprised if there isn't a module for this. Worst case scenario, just import it directly into your SQL database.

I know this isn't as automatic as the thread opener described, but if you're manually creating each contact one at a time, isn't that in itself a bit tedious? If you're creating contacts one at a time, it may be much easier for you to just 1) import all your desired contacts into CiviCRM and 2) follow the steps I highlighted above to create new users for each of your CiviCRM contacts.

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Exporting users from CiviCRM to Drupal
November 08, 2012, 01:30:15 pm
Yes, there  is not a setting to create a CMS account when creating a contact automatically, but would be a huge benefit to avoid the second step of the "Action" required to do so by adding it to the contact creation screen. Chime in someone if you know how to add this to contact creation page.

There is great documentation on how to export contacts from CiviCRM into a CSV and the use the "Import" module to import all users into Drupal. Not sure about other CMS's but I would say that the process is similar.

Here is the Drupal link: http://wiki.civicrm.org/confluence/display/CRMDOC42/Creating+a+Drupal+user+for+every+CiviCRM+contact

Most of these types of thigns have been done for a while so searching the doc section rather than the forum might be a bit better in terms of results.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Exporting users from CiviCRM to Drupal
November 08, 2012, 02:33:57 pm
User Import is getting closer for D7 - i might blog about it when it is working properly

http://drupal.org/node/1833960
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Exporting users from CiviCRM to Drupal
November 09, 2012, 05:42:56 am
@Petednz - Thanks for the update. I guess I didn't run into that problem as I explicitly didn't want an email going to each email address and I activated the accounts instead of requiring the link.  I do know that if you want my options then it currently works. If you want the email and account link to work looks like Petednz will be gracious enough to blog about it that they fixed that issue.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

flug

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 12
Re: Exporting users from CiviCRM to Drupal
December 18, 2012, 04:57:20 pm
Quote from: NASACT on November 08, 2012, 01:30:15 pm
Here is the Drupal link: http://wiki.civicrm.org/confluence/display/CRMDOC42/Creating+a+Drupal+user+for+every+CiviCRM+contact

Use, we use the "user import module" method outlined there and it is about as easy as could be without being 100% automated.  (In fact it is SO easy it would really be nice to just get it 100% automated . . . can't quite see how to get that done, though, with the tools at hand.)

The steps for creating your drupal accounts are:

 - Use advanced search (or any other search method for contacts) to select whichever CiviCRM contacts you want to make Drupal Accounts for
 - Export primary fields for those contacts
 - Go to Drupal User Import Module
 - Select "Import" and the CSV file you just created as well as the User Import Module template you previously set up/saved (see below)
 - Test the Import, then Import for real

That's it!

One caveat--that easy/simple process works AFTER you have worked through one import, figured out all the fields and settings you want in the User Import Module, and then SAVED those settings as a template which you can then use from then on.

That took me a few hours of messing around, to get all the fields and settings exactly as I wanted them and (the most time consuming of all) to compose the email message that goes to new members/new drupal accounts that explains what is going on and how to access their new account.

Once you get all that set up, though, you just save the settings template file in Import User Module and from then on it is easy.

FWIW I set up the Login Toboggan module so that users can always log in with their email address OR username.  Using the User Import Module you can set up which user role your civicrm imports will be assigned to.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Exporting users from CiviCRM to Drupal
December 18, 2012, 05:04:06 pm
flug - just to be clear, are you talking D6 or D7
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

flug

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 12
Re: Exporting users from CiviCRM to Drupal
December 31, 2012, 08:46:21 am
Quote from: petednz on December 18, 2012, 05:04:06 pm
flug - just to be clear, are you talking D6 or D7

D6, though the User Import module has a D7 version which I assume works much the same.

http://drupal.org/project/user_import

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Exporting users from CiviCRM to Drupal

This forum was archived on 2017-11-26.