Answers.Body: <p>That is indeed how the Drupal / CiviCRM user integration works: Users = Individuals.</p>
  
  <p>We stick to this way of working so we're not restricting ourselves to having to maintain a customisation like this which would be business critical if it stopped working after an upgrade.</p>
  
  <p>Having accounts linked to an individual is also good, as it shows <strong>who</strong> in the organisation did something, like apply for membership.</p>
  
  <p>It also means things like event registrations work as expected as a person will be attending those. </p>
  
  <p>Using webforms, you can easily expose information about a person and their related contacts so they can update their details as well as their organisation's at any time. Keeping contact 1 as the logged in user makes this easy.</p>
  
  <p>There is also this blog from Whitefuse Media which explains a similar situation and how they handled it (see the section: Drupal Users Synced to CiviCRM Organisations)</p>
  
  <p><a href="http://www.whitefusemedia.com/blog/civicrm-development-case-study" rel="nofollow">http://www.whitefusemedia.com/blog/civicrm-development-case-study</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-15T15:25:06.593Z
Answers.Text: Thanks for the feedback. However it is possible to link a CiviCRM Organization with a Drupal user account from within CiviCRM. I agree that in many cases it makes sense to have a dedicated contact person handling the login. But there are many other scenarios where you actually want the organization to have an user account (in our case: in addition to the contact persons that get an Drupal account as well...).
Answers.UserDisplayName: Fabian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T00:27:26.800Z
Answers.Text: "it is possible to link a CiviCRM Organization with a Drupal user account from within CiviCRM" ? care to confirm how/where?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T06:53:20.980Z
Answers.Text: @pete: If you you view an organization simply choose "create user record" from the action menu.
Answers.UserDisplayName: Fabian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T07:30:46.310Z
Answers.Text: There is no "out-of-the-box" solution for this. You would need to build something custom. Please see the link to the Whitefuse Media blog where they discuss making this customisation and where they have shared their code. It was written a few years ago now, so may not be compatible with your current versions.
Answers.UserDisplayName: Heather O.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T11:22:45.270Z
Answers.Text: @Heather: Do you happen to have the link to the Repository of the moduel?
  
  As the CiviCRM UI already provides what we want, I will also look into doing it via the API...
  
  Other suggestions are still aprecciated :)
Answers.UserDisplayName: Fabian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T12:10:47.150Z
Answers.Text: @Fabian Sorry, don't know the direct link. They just refer to it being on their GitHub repository. Maybe someone at the Whitefuse team could help? http://www.whitefusemedia.com/contact
Answers.UserDisplayName: Heather O.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-16T20:18:39.073Z
Answers.Text: @fabian. using the Demo site for eg http://d46.demo.civicrm.org/civicrm/contact/view?reset=1&cid=120 which is an Org, on the Actions button I do not see "User Record", which is what I do see for an Individual. Am I still missing something? If you do have this ability on your site, but not on demo, then has a minor change has been made to your system to allow it?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-17T06:44:06.757Z
Answers.Text: Heather: Thanks, I contacted them and they added the download link to the blog bost. Pete: You're right but maybe that is because one doesn't have the necessary Drupal permissions on the demo. I have this feature with any fresh CiviCRM/Drupal install.
Answers.UserDisplayName: Fabian
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-08T02:57:47.640Z
Answers.Text: @fabian your comment regarding creating a user record saved me a heap of time. Thanks!
Answers.UserDisplayName: Sohal Khatwani
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-15T15:00:26.420Z
Answers.LastActivityDate: 2015-07-15T15:00:26.420Z
Answers.UserDisplayName: Heather O.
Answers.Body: <p>You can use the approach outlined here which uses Drupal Rules to create the User and send them a 'you have an account' email etc. The Rule can be triggered off a Civi Tag, ie you find your Orgs, you Tag them with a tag such as 'create drupal account' and Rules does the rest.</p>
  
  <p><a href="https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and" rel="nofollow noreferrer">https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-17T06:47:06.130Z
Answers.Text: Thanks for this, I had seen you Blogpost but was hoping to avoid all  the entity & rule setup as I only need to the whole user creation thing initially. Anyway, I will try a couple of approaches and let all of you know how it turned out (and mark one answer as the correct one ^^)
Answers.UserDisplayName: Fabian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2015-07-16T20:16:19.443Z
Answers.LastActivityDate: 2020-03-11T12:51:03.927Z
Answers.LastEditDate: 2020-03-11T12:51:03.927Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>With Drupal and CiviCRM it is rather straight forward to bulk create Drupal users from CiviCRM individuals and connect them at the same time:</p>
  
  <ol>
  <li>Export the individuals from CiviCRM</li>
  <li>Import them into Drupal using the module User Import</li>
  </ol>
  
  <p>It works really nice: Drupal accounts are created and at the same time connected with the CivicRM contacts. And the Drupal module gives you a lot of nice options such as sending out an email with a one-time login or defining user names.</p>
  
  <p>If you try the same approach with CiviCRM organizations, it will create Drupal User records but wont connect them with the according CiviCRM contacts.</p>
  
  <p>I made sure that the matching/dedupe rules should not be a problem (email only) and disabled CiviCRM profiles (the default name and address profile contains individual only fields) - but no success.</p>
  
  <p>Any ideas on how to bulk create organizations? Preferably using Drupal user import or anything that is doable via the UI and/or not too complex?</p>
  
Tags: <drupal><user-account>
Title: Is there a way to bulk create (and connect) drupal users from CiviCRM Organizations?
ThreadText: # Is there a way to bulk create (and connect) drupal users from CiviCRM Organizations?
  
  (Asked by: username_0 on 2015-07-15)
  
  With Drupal and CiviCRM it is rather straight forward to bulk create Drupal users from CiviCRM individuals and connect them at the same time:
  
  1. Export the individuals from CiviCRM
  2. Import them into Drupal using the module User Import
  
  It works really nice: Drupal accounts are created and at the same time connected with the CivicRM contacts. And the Drupal module gives you a lot of nice options such as sending out an email with a one-time login or defining user names.
  
  If you try the same approach with CiviCRM organizations, it will create Drupal User records but wont connect them with the according CiviCRM contacts.
  
  I made sure that the matching/dedupe rules should not be a problem (email only) and disabled CiviCRM profiles (the default name and address profile contains individual only fields) - but no success.
  
  Any ideas on how to bulk create organizations? Preferably using Drupal user import or anything that is doable via the UI and/or not too complex?
  
  **Tags:** drupal, user-account
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-07-15. Score: 3
  
  That is indeed how the Drupal / CiviCRM user integration works: Users = Individuals.
  
  We stick to this way of working so we're not restricting ourselves to having to maintain a customisation like this which would be business critical if it stopped working after an upgrade.
  
  Having accounts linked to an individual is also good, as it shows **who** in the organisation did something, like apply for membership.
  
  It also means things like event registrations work as expected as a person will be attending those.
  
  Using webforms, you can easily expose information about a person and their related contacts so they can update their details as well as their organisation's at any time. Keeping contact 1 as the logged in user makes this easy.
  
  There is also this blog from Whitefuse Media which explains a similar situation and how they handled it (see the section: Drupal Users Synced to CiviCRM Organisations)
  
  <http://www.whitefusemedia.com/blog/civicrm-development-case-study>
  
  > **Comments:**
  > **username_0**: Thanks for the feedback. However it is possible to link a CiviCRM Organization with a Drupal user account from within CiviCRM. I agree that in many cases it makes sense to have a dedicated contact person handling the login. But there are many other scenarios where you actually want the organization to have an user account (in our case: in addition to the contact persons that get an Drupal account as well...).  
  > **username_2**: "it is possible to link a CiviCRM Organization with a Drupal user account from within CiviCRM" ? care to confirm how/where?  
  > **username_0**: @pete: If you you view an organization simply choose "create user record" from the action menu.  
  > **username_1**: There is no "out-of-the-box" solution for this. You would need to build something custom. Please see the link to the Whitefuse Media blog where they discuss making this customisation and where they have shared their code. It was written a few years ago now, so may not be compatible with your current versions.  
  > **username_0**: @Heather: Do you happen to have the link to the Repository of the moduel?  As the CiviCRM UI already provides what we want, I will also look into doing it via the API...  Other suggestions are still aprecciated :)  
  > **username_1**: @username_0 Sorry, don't know the direct link. They just refer to it being on their GitHub repository. Maybe someone at the Whitefuse team could help? http://www.whitefusemedia.com/contact  
  > **username_2**: @fabian. using the Demo site for eg http://d46.demo.civicrm.org/civicrm/contact/view?reset=1&cid=120 which is an Org, on the Actions button I do not see "User Record", which is what I do see for an Individual. Am I still missing something? If you do have this ability on your site, but not on demo, then has a minor change has been made to your system to allow it?  
  > **username_0**: Heather: Thanks, I contacted them and they added the download link to the blog bost. Pete: You're right but maybe that is because one doesn't have the necessary Drupal permissions on the demo. I have this feature with any fresh CiviCRM/Drupal install.  
  > **username_3**: @fabian your comment regarding creating a user record saved me a heap of time. Thanks!  
  
  ---
  
  ### Answer by username_2 on 2015-07-16. Score: 1
  
  You can use the approach outlined here which uses Drupal Rules to create the User and send them a 'you have an account' email etc. The Rule can be triggered off a Civi Tag, ie you find your Orgs, you Tag them with a tag such as 'create drupal account' and Rules does the rest.
  
  <https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and>
  
  > **Comments:**
  > **username_0**: Thanks for this, I had seen you Blogpost but was hoping to avoid all  the entity & rule setup as I only need to the whole user creation thing initially. Anyway, I will try a couple of approaches and let all of you know how it turned out (and mark one answer as the correct one ^^)  
  
  ---
  
  