Answers.Body: <p>Somewhere, I came across a thread that Brad had provided a bit of insight about the First &amp; Last name fields. They are kind of "special" is all I can remember.</p>
  
  <p>In any event, the First &amp; Last name fields do not need the <code>fields</code> prepended to them. They can get passed along like this:</p>
  
  <pre><code>&lt;input type="text" id="firstName" name="firstName" class="form-control" 
  {%- if account is defined %} value="{{ account.firstName }}"{% endif %}"&gt;
  {{ account is defined and account ? errorList(account.getErrors('firstName')) }}
  
  ...
  
  &lt;input type="text" id="lastName" name="lastName" class="form-control" 
  {%- if account is defined %} value="{{ account.lastName }}"{% endif %}"&gt;
  {{ account is defined and account ? errorList(account.getErrors('lastName')) }}
  </code></pre>
  
  <p>As for not getting added to your group, have you created a user group for newly registered users? For example, let's say I created a user group called "Public". Then (assuming you are using Craft Pro) Craft will give me the option to choose which user group I want the default user group to be. Are you able to set that?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-04T09:57:44.803Z
Answers.Text: Thanks Damon, The first name and last name now function properly after updating the name attribute to the input. With regards to the user not getting added to the default group 'Registered User' - yes I have Craft Pro, yes the group has been selected as the default group that new users will be added to, but no they are not being added to it. FYI the group is empty currently. Thanks
Answers.UserDisplayName: Adam Menczykowski
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-04T16:01:27.707Z
Answers.Text: Can anybody chime in as to perhaps why the new user is not getting added to the default group?
Answers.UserDisplayName: Adam Menczykowski
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-06T15:36:25.107Z
Answers.Text: Update: Disabling 'Verify email addresses?' doesn't alter the behaviour other than the user is created and activated simultaneously. Unfortunately, the user is still not added to the default user group.
Answers.UserDisplayName: Adam Menczykowski
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-07T14:23:12.337Z
Answers.Text: Probably silly comment, but do you have "allow guest registration" checked? Very strange that the users aren't getting added. When you visit that CP screen, does the drop down reflect the default user group?
Answers.UserDisplayName: Damon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-07T15:08:56.540Z
Answers.Text: If you mean 'Allow public registration?' - yes that is checked. And yes the dropdown reflects the default user group 'Registered Users'
Answers.UserDisplayName: Adam Menczykowski
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-07T17:20:36.153Z
Answers.Text: I wonder if Sprout Forms is affecting this native Registration Form?
Answers.UserDisplayName: Adam Menczykowski
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-07T17:56:44.423Z
Answers.Text: That is possible - in my (limited) user registration experience I've never had a problem getting users to show. I'd hit up the guys at Sprout to see if they have noticed anything like this before.
Answers.UserDisplayName: Damon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-11T14:02:08.860Z
Answers.Text: The user is getting added, but not added to the default group, even after confirmation email link has been clicked. I'll speak to the Sprout guys to see if they've heard of anything like this before. Thanks
Answers.UserDisplayName: Adam Menczykowski
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-01T01:10:41.280Z
Answers.Text: Same answer here.  Has this been resolved?
Answers.UserDisplayName: biko
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-01T01:27:14.023Z
Answers.Text: UPDATE: it seems to work actually.  Cases where this doesn't work seems to be if you're already logged in Craft (as an admin in my case).
Answers.UserDisplayName: biko
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-23T15:56:28.540Z
Answers.LastActivityDate: 2015-12-23T15:56:28.540Z
Answers.UserDisplayName: Damon
Answers.Body: <p><strong>Answer to the confirmation email and group issue.</strong></p>
  
  <p>I was have the exact same issue but it seems that it was because I was already logged into Craft (as an admin in my case).  So try it in a private window or be sure to not be logged in.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-01T01:28:38.240Z
Answers.LastActivityDate: 2019-09-01T01:28:38.240Z
Answers.UserDisplayName: biko
Body: <p>I have been testing out my user registration form and get to the following point:</p>
  
  <p><strong>1. User is created</strong> </p>
  
  <p>Most of the profile is created, except the firstName and lastName (these are the handles that I am using in the form) are not created.</p>
  
  <p><strong>2. User is not added to default group</strong></p>
  
  <p>Here is my form markup:</p>
  
  <pre><code>&lt;form method="post" accept-charset="UTF-8"&gt;
      {{ getCsrfInput() }}
  
      &lt;input type="hidden" name="action" value="users/saveUser"&gt;
      &lt;input type="hidden" name="redirect" value="{{ url('/?status=registrationEmailSent') }}"&gt;
  
      {% macro errorList(errors) %}
          {% if errors %}
              &lt;ul class="errors"&gt;
                  {% for error in errors %}
                      &lt;li&gt;{{ error }}&lt;/li&gt;
                  {% endfor %}
              &lt;/ul&gt;
          {% endif %}
      {% endmacro %}
  
      {% from _self import errorList %}
  
      &lt;h3&gt;Required fields:&lt;/h3&gt;
  
      &lt;h4&gt;&lt;label for="firstName"&gt;First Name&lt;/label&gt;&lt;/h4&gt;
      &lt;input type="text" id="firstName" name="fields[firstName]" 
          {%- if account is defined %} value="{{ account.firstName }}"{% endif %}&gt;
      {{ account is defined and account ? errorList(account.getErrors('firstName')) }}
  
      &lt;h4&gt;&lt;label for="lastName"&gt;Surname&lt;/label&gt;&lt;/h4&gt;
      &lt;input type="text" id="lastName" name="fields[lastName]" 
          {%- if account is defined %} value="{{ account.lastName }}"{% endif %}&gt;
      {{ account is defined and account ? errorList(account.getErrors('lastName')) }}
  
      &lt;h4&gt;&lt;label for="username"&gt;Username&lt;/label&gt;&lt;/h4&gt;
      &lt;input id="username" type="text" name="username"
          {%- if account is defined %} value="{{ account.username }}"{% endif -%}&gt;
  
      {% if account is defined %}
          {{ errorList(account.getErrors('username')) }}
      {% endif %}
  
      &lt;h4&gt;&lt;label for="email"&gt;Email&lt;/label&gt;&lt;/h4&gt;
      &lt;input id="email" type="text" name="email"
          {%- if account is defined %} value="{{ account.email }}"{% endif %}&gt;
  
      {% if account is defined %}
          {{ errorList(account.getErrors('email')) }}
      {% endif %}
  
      &lt;h4&gt;&lt;label for="password"&gt;Password&lt;/label&gt;&lt;/h4&gt;
      &lt;input id="password" type="password" name="password"&gt;
  
      {% if account is defined %}
          {{ errorList(account.getErrors('password')) }}
      {% endif %}
  
      &lt;h3&gt;Optional fields:&lt;/h3&gt;
      &lt;p class="instructions"&gt;We would appreciate it if you could please provide just a little bit more info about your company.&lt;/p&gt;
      &lt;h4&gt;&lt;label for="membersCompanyName"&gt;Company Name&lt;/label&gt;&lt;/h4&gt;
      &lt;input type="text" id="membersCompanyName" name="fields[membersCompanyName]" 
          {%- if account is defined %} value="{{ account.membersCompanyName }}"{% endif %}&gt;
      {{ account is defined and account ? errorList(account.getErrors('membersCompanyName')) }}
  
      &lt;h4&gt;&lt;label for="membersPosition"&gt;Job Title&lt;/label&gt;&lt;/h4&gt;
      &lt;input type="text" id="membersPosition" name="fields[membersPosition]" 
          {%- if account is defined %} value="{{ account.membersPosition }}"{% endif %}&gt;
      {{ account is defined and account ? errorList(account.getErrors('membersPosition')) }}
  
      &lt;h4&gt;&lt;label for="membersPhoneNumber"&gt;Telephone no.&lt;/label&gt;&lt;/h4&gt;
      &lt;input type="text" id="membersPhoneNumber" name="fields[membersPhoneNumber]" 
          {%- if account is defined %} value="{{ account.membersPhoneNumber }}"{% endif %}&gt;
      {{ account is defined and account ? errorList(account.getErrors('membersPhoneNumber')) }}
  
      &lt;h4&gt;&lt;label for="membersWebsite"&gt;Website&lt;/label&gt;&lt;/h4&gt;
      &lt;input type="text" id="membersWebsite" name="fields[membersWebsite]" 
          {%- if account is defined %} value="{{ account.membersWebsite }}"{% endif %}&gt;
      {{ account is defined and account ? errorList(account.getErrors('membersWebsite')) }}
  
      &lt;input type="submit" value="Register"&gt;
      &lt;p&gt;&lt;a href="{{ url('members/login') }}"&gt;No, I just want to log in.&lt;/a&gt;&lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-05-10T15:16:32.007Z
Comments.Text: Have exactly same problem where user is not being added to a group on registration in the front-end. did you work out a solution to this problem?
Comments.UserDisplayName: Cole Henley
Tags: <registration><user-groups><craft-pro>
Title: User registration - no confirmation email sent, not added to group
ThreadText: # User registration - no confirmation email sent, not added to group
  
  (Asked by: username_0 on 2015-12-23)
  
  I have been testing out my user registration form and get to the following point:
  
  **1. User is created**
  
  Most of the profile is created, except the firstName and lastName (these are the handles that I am using in the form) are not created.
  
  **2. User is not added to default group**
  
  Here is my form markup:
  
  ```
  <form method="post" accept-charset="UTF-8">
      {{ getCsrfInput() }}
  
      <input type="hidden" name="action" value="users/saveUser">
      <input type="hidden" name="redirect" value="{{ url('/?status=registrationEmailSent') }}">
  
      {% macro errorList(errors) %}
          {% if errors %}
              <ul class="errors">
                  {% for error in errors %}
                      <li>{{ error }}</li>
                  {% endfor %}
              </ul>
          {% endif %}
      {% endmacro %}
  
      {% from _self import errorList %}
  
      <h3>Required fields:</h3>
  
      <h4><label for="firstName">First Name</label></h4>
      <input type="text" id="firstName" name="fields[firstName]" 
          {%- if account is defined %} value="{{ account.firstName }}"{% endif %}>
      {{ account is defined and account ? errorList(account.getErrors('firstName')) }}
  
      <h4><label for="lastName">Surname</label></h4>
      <input type="text" id="lastName" name="fields[lastName]" 
          {%- if account is defined %} value="{{ account.lastName }}"{% endif %}>
      {{ account is defined and account ? errorList(account.getErrors('lastName')) }}
  
      <h4><label for="username">Username</label></h4>
      <input id="username" type="text" name="username"
          {%- if account is defined %} value="{{ account.username }}"{% endif -%}>
  
      {% if account is defined %}
          {{ errorList(account.getErrors('username')) }}
      {% endif %}
  
      <h4><label for="email">Email</label></h4>
      <input id="email" type="text" name="email"
          {%- if account is defined %} value="{{ account.email }}"{% endif %}>
  
      {% if account is defined %}
          {{ errorList(account.getErrors('email')) }}
      {% endif %}
  
      <h4><label for="password">Password</label></h4>
      <input id="password" type="password" name="password">
  
      {% if account is defined %}
          {{ errorList(account.getErrors('password')) }}
      {% endif %}
  
      <h3>Optional fields:</h3>
      <p class="instructions">We would appreciate it if you could please provide just a little bit more info about your company.</p>
      <h4><label for="membersCompanyName">Company Name</label></h4>
      <input type="text" id="membersCompanyName" name="fields[membersCompanyName]" 
          {%- if account is defined %} value="{{ account.membersCompanyName }}"{% endif %}>
      {{ account is defined and account ? errorList(account.getErrors('membersCompanyName')) }}
  
      <h4><label for="membersPosition">Job Title</label></h4>
      <input type="text" id="membersPosition" name="fields[membersPosition]" 
          {%- if account is defined %} value="{{ account.membersPosition }}"{% endif %}>
      {{ account is defined and account ? errorList(account.getErrors('membersPosition')) }}
  
      <h4><label for="membersPhoneNumber">Telephone no.</label></h4>
      <input type="text" id="membersPhoneNumber" name="fields[membersPhoneNumber]" 
          {%- if account is defined %} value="{{ account.membersPhoneNumber }}"{% endif %}>
      {{ account is defined and account ? errorList(account.getErrors('membersPhoneNumber')) }}
  
      <h4><label for="membersWebsite">Website</label></h4>
      <input type="text" id="membersWebsite" name="fields[membersWebsite]" 
          {%- if account is defined %} value="{{ account.membersWebsite }}"{% endif %}>
      {{ account is defined and account ? errorList(account.getErrors('membersWebsite')) }}
  
      <input type="submit" value="Register">
      <p><a href="{{ url('members/login') }}">No, I just want to log in.</a></p>
  </form>
  
  ```
  
  Any help would be greatly appreciated.
  
  **Tags:** registration, user-groups, craft-pro
  
  > **Comments:**
  > **username_1**: Have exactly same problem where user is not being added to a group on registration in the front-end. did you work out a solution to this problem?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-12-23. Score: 1 | Accepted answer
  
  Somewhere, I came across a thread that Brad had provided a bit of insight about the First & Last name fields. They are kind of "special" is all I can remember.
  
  In any event, the First & Last name fields do not need the `fields` prepended to them. They can get passed along like this:
  
  ```
  <input type="text" id="firstName" name="firstName" class="form-control" 
  {%- if account is defined %} value="{{ account.firstName }}"{% endif %}">
  {{ account is defined and account ? errorList(account.getErrors('firstName')) }}
  
  ...
  
  <input type="text" id="lastName" name="lastName" class="form-control" 
  {%- if account is defined %} value="{{ account.lastName }}"{% endif %}">
  {{ account is defined and account ? errorList(account.getErrors('lastName')) }}
  
  ```
  
  As for not getting added to your group, have you created a user group for newly registered users? For example, let's say I created a user group called "Public". Then (assuming you are using Craft Pro) Craft will give me the option to choose which user group I want the default user group to be. Are you able to set that?
  
  > **Comments:**
  > **username_0**: Thanks username_2, The first name and last name now function properly after updating the name attribute to the input. With regards to the user not getting added to the default group 'Registered User' - yes I have Craft Pro, yes the group has been selected as the default group that new users will be added to, but no they are not being added to it. FYI the group is empty currently. Thanks  
  > **username_0**: Can anybody chime in as to perhaps why the new user is not getting added to the default group?  
  > **username_0**: Update: Disabling 'Verify email addresses?' doesn't alter the behaviour other than the user is created and activated simultaneously. Unfortunately, the user is still not added to the default user group.  
  > **username_2**: Probably silly comment, but do you have "allow guest registration" checked? Very strange that the users aren't getting added. When you visit that CP screen, does the drop down reflect the default user group?  
  > **username_0**: If you mean 'Allow public registration?' - yes that is checked. And yes the dropdown reflects the default user group 'Registered Users'  
  > **username_0**: I wonder if Sprout Forms is affecting this native Registration Form?  
  > **username_2**: That is possible - in my (limited) user registration experience I've never had a problem getting users to show. I'd hit up the guys at Sprout to see if they have noticed anything like this before.  
  > **username_0**: The user is getting added, but not added to the default group, even after confirmation email link has been clicked. I'll speak to the Sprout guys to see if they've heard of anything like this before. Thanks  
  > **username_3**: Same answer here.  Has this been resolved?  
  > **username_3**: UPDATE: it seems to work actually.  Cases where this doesn't work seems to be if you're already logged in Craft (as an admin in my case).  
  
  ---
  
  ### Answer by username_3 on 2019-09-01. Score: 0
  
  **Answer to the confirmation email and group issue.**
  
  I was have the exact same issue but it seems that it was because I was already logged into Craft (as an admin in my case). So try it in a private window or be sure to not be logged in.
  
  
  ---
  
  