Answers.Body: <p>You can use Drupal Rules to create the Drupal User for a contact when they get a Membership status of 'x'. </p>
  
  <p>Here is one that KarinG has shared before <a href="https://civicrm.stackexchange.com/questions/24160/using-civimember-to-automatically-create-a-drupal-user/24163">Using CiviMember to automatically create a Drupal user</a></p>
  
  <p>Thank you Karin</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-27T03:36:04.140Z
Answers.Text: I have posted a detailed example of such on SE previously - perhaps a few months ago
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-27T13:11:10.497Z
Answers.Text: Found it -> https://civicrm.stackexchange.com/questions/24160/using-civimember-to-automatically-create-a-drupal-user/24163
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-27T20:10:22.453Z
Answers.Text: Marvellous - wondering how we could better tag these for future searchers.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-27T23:44:46.947Z
Answers.Text: Yeah I had troubles finding it myself :-)
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-28T06:19:34.060Z
Answers.Text: That was why i went for the Fuzion Treasure Trove approach of adding example code to a quick blog with taxonomy so easy to find ;-) But I don't think to add everything there that I explain on here. But better to have on here than in Chat where things really disappear without trace
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-28T13:16:09.340Z
Answers.Text: Thank you Karin and Pete! I will spend the next day or 2 implementing the above and report back how I got on. Thanks agin.
Answers.UserDisplayName: samj
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-29T07:11:42.733Z
Answers.Text: Hi, I got the rule working without too much difficulty. I'm still pretty new to rules so a bit of learning took place. There are 2 small issues
  
  1: I can't figure out what the rule is in the conditions part. Can you point me in the right direction? Is the condition checking if the user already exists in Drupal core?
Answers.UserDisplayName: samj
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-29T07:11:49.060Z
Answers.Text: 2: I want to assign the membership to the organisation. When I do this the username which gets generated is the payment card information firstname_surname. This leads the thread onto a greater scope than my initial question. Does it matter who the membership sits with (induvial or organisation?) as I have added the relationship type in:
  
  Administer  CiviMember  Memebership Types
  
  I feel like I’m getting so close to putting this site into production! Thank you for your help
Answers.UserDisplayName: samj
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-29T19:56:24.387Z
Answers.Text: i haven't tried building a Rule that is based on Inherited Membership but in general you want an individual to be the User so that is the route I would be looking down if i were you
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-26T20:03:08.383Z
Answers.LastActivityDate: 2018-06-27T20:09:28.783Z
Answers.LastEditDate: 2018-06-27T20:09:28.783Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>This rule seems to work when a relationship is added. I have added an extra to to select the type of relationship, as there are multiple on the webform:
  <a href="https://i.sstatic.net/Hq2mN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Hq2mN.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T01:56:49.003Z
Answers.Text: Can you explain this a bit more - I don't follow how this is an Anwer to your own Question since the Q had no reference to Relationships, but only talked about Memberships. COuld you pls edit your question to make it clearer what you were trying to achieve - it will help others who come along in your wake
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-06T01:32:10.023Z
Answers.LastActivityDate: 2018-07-06T01:32:10.023Z
Answers.UserDisplayName: samj
Body: <p>I would like to create a Drupal user account when a user becomes a member via a webform. Ideally a user would get redirected from the webform to a profile, but I do not think this is possible?</p>
  
  <p>I have come across this article, which was written over 5 years ago, is it still valid? <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>
  
  <p>It seems like it would work, but for ease would this workflow be suitable?</p>
  
  <ol>
  <li><p>User applies for account via a profile/Drupal core registration form (Payment pending group/role gets assigned)</p></li>
  <li><p>Edit some template files so the site checks for current role assigned to a user and displays a message informing they have finalise the membership process and pay if they have the Payment pending role.</p></li>
  <li><p>User is directed to a webform and pays.</p></li>
  <li><p>User is removed from Payment pending and Added as a full member</p></li>
  </ol>
  
  <p>I'm sure both solutions would work. It would be great to hear from other people who have more experience with Civi.</p>
  
  <p>Cheers</p>
  
Tags: <webform-civicrm><user-account>
Title: create an Drupal core account when using a webform
ThreadText: # create an Drupal core account when using a webform
  
  (Asked by: username_0 on 2018-06-26)
  
  I would like to create a Drupal user account when a user becomes a member via a webform. Ideally a user would get redirected from the webform to a profile, but I do not think this is possible?
  
  I have come across this article, which was written over 5 years ago, is it still valid? <https://civicrm.org/blog/username_1/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and>
  
  It seems like it would work, but for ease would this workflow be suitable?
  
  1. User applies for account via a profile/Drupal core registration form (Payment pending group/role gets assigned)
  2. Edit some template files so the site checks for current role assigned to a user and displays a message informing they have finalise the membership process and pay if they have the Payment pending role.
  3. User is directed to a webform and pays.
  4. User is removed from Payment pending and Added as a full member
  
  I'm sure both solutions would work. It would be great to hear from other people who have more experience with Civi.
  
  Cheers
  
  **Tags:** webform-civicrm, user-account
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-06-26. Score: 2 | Accepted answer
  
  You can use Drupal Rules to create the Drupal User for a contact when they get a Membership status of 'x'.
  
  Here is one that username_2 has shared before [Using CiviMember to automatically create a Drupal user](https://civicrm.stackexchange.com/questions/24160/using-civimember-to-automatically-create-a-drupal-user/24163)
  
  Thank you Karin
  
  > **Comments:**
  > **username_2**: I have posted a detailed example of such on SE previously - perhaps a few months ago  
  > **username_2**: Found it -> https://civicrm.stackexchange.com/questions/24160/using-civimember-to-automatically-create-a-drupal-user/24163  
  > **username_1**: Marvellous - wondering how we could better tag these for future searchers.  
  > **username_2**: Yeah I had troubles finding it myself :-)  
  > **username_1**: That was why i went for the username_1 Treasure Trove approach of adding example code to a quick blog with taxonomy so easy to find ;-) But I don't think to add everything there that I explain on here. But better to have on here than in Chat where things really disappear without trace  
  > **username_0**: Thank you Karin and Pete! I will spend the next day or 2 implementing the above and report back how I got on. Thanks agin.  
  > **username_0**: Hi, I got the rule working without too much difficulty. I'm still pretty new to rules so a bit of learning took place. There are 2 small issues  1: I can't figure out what the rule is in the conditions part. Can you point me in the right direction? Is the condition checking if the user already exists in Drupal core?  
  > **username_0**: 2: I want to assign the membership to the organisation. When I do this the username which gets generated is the payment card information firstname_surname. This leads the thread onto a greater scope than my initial question. Does it matter who the membership sits with (induvial or organisation?) as I have added the relationship type in:  Administer  CiviMember  Memebership Types  I feel like I’m getting so close to putting this site into production! Thank you for your help  
  > **username_1**: i haven't tried building a Rule that is based on Inherited Membership but in general you want an individual to be the User so that is the route I would be looking down if i were you  
  
  ---
  
  ### Answer by username_0 on 2018-07-06. Score: 0
  
  This rule seems to work when a relationship is added. I have added an extra to to select the type of relationship, as there are multiple on the webform:
  [![enter image description here](https://i.sstatic.net/Hq2mN.png)](https://i.sstatic.net/Hq2mN.png)
  
  > **Comments:**
  > **username_1**: Can you explain this a bit more - I don't follow how this is an Anwer to your own Question since the Q had no reference to Relationships, but only talked about Memberships. COuld you pls edit your question to make it clearer what you were trying to achieve - it will help others who come along in your wake  
  
  ---
  
  