<blockquote>
<p>The users are not getting assigned to the default user group.</p>
</blockquote>
<p>You're probably testing front-end user registration with an already logged in user account.</p>
<p>Make sure you log out of your current one first before you start testing creating new users.</p>
<blockquote>
<p>The password is not required but fails validation when there is 1-6 characters (as it should).</p>
<p>Must I enforce the password required client side?</p>
</blockquote>
<p>Yeah... currently you'll need to enforce it client-side for front-end registration.  I'll see what we can do to improve that.</p>

CC BY-SA 3.0
2014-11-24T00:12:35.280Z
Cheers on logging out. For the password thing, I'd assume Craft should fail a registration if the password field is blank. At least that's what I want.
veritascs
CC BY-SA 3.0
2014-11-24T00:36:41.493Z
Got it... updated the answer.
Brad Bell
CC BY-SA 3.0
2014-11-23T23:28:38.903Z
2014-11-24T00:36:30.170Z
2020-06-17T08:56:27.903Z
Brad Bell
<p>So I'm trying to setup public registration for the first time. I'm running into two problems:</p>

<ol>
<li>The users are not getting assigned to the default user group</li>
<li><p>The password is not required but fails validation when there is 1-6 characters (as it should).</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=""&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;&lt;label for="username"&gt;Username&lt;/label&gt;&lt;/h3&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;h3&gt;&lt;label for="email"&gt;Email&lt;/label&gt;&lt;/h3&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;h3&gt;&lt;label for="password"&gt;Password&lt;/label&gt;&lt;/h3&gt;
&lt;input id="password" type="password" name="password"&gt;

{% if account is defined %}
    {{ errorList(account.getErrors('password')) }}
{% endif %}

&lt;input type="submit" value="Register"&gt;
&lt;/form&gt;
</code></pre></li>
</ol>

<p>Must I enforce the password required client side?</p>

<p>EDIT: LOGOUT of the admin pages when testing registration (or just go into an icognito window). This fixed the password being blank passing validation issue AND the user group not getting assigned.</p>

<users><registration>
Public Registration
# Public Registration

(Asked by: username_0 on 2014-11-23)

So I'm trying to setup public registration for the first time. I'm running into two problems:

The users are not getting assigned to the default user group
The password is not required but fails validation when there is 1-6 characters (as it should).

{{ getCsrfInput() }}



{% macro errorList(errors) %}
    {% if errors %}
        
            {% for error in errors %}
                {{ error }}
            {% endfor %}
        
    {% endif %}
{% endmacro %}

{% from _self import errorList %}

Username


{% if account is defined %}
    {{ errorList(account.getErrors('username')) }}
{% endif %}

Email


{% if account is defined %}
    {{ errorList(account.getErrors('email')) }}
{% endif %}

Password


{% if account is defined %}
    {{ errorList(account.getErrors('password')) }}
{% endif %}





Must I enforce the password required client side?
EDIT: LOGOUT of the admin pages when testing registration (or just go into an icognito window). This fixed the password being blank passing validation issue AND the user group not getting assigned.

**Tags:** users, registration

---

## 1 answers

### Answer by username_1 on 2014-11-23. Score: 6 | Accepted answer

> The users are not getting assigned to the default user group.

You're probably testing front-end user registration with an already logged in user account.

Make sure you log out of your current one first before you start testing creating new users.

> The password is not required but fails validation when there is 1-6 characters (as it should).
>
> Must I enforce the password required client side?

Yeah... currently you'll need to enforce it client-side for front-end registration. I'll see what we can do to improve that.

> **Comments:**
> **username_0**: Cheers on logging out. For the password thing, I'd assume Craft should fail a registration if the password field is blank. At least that's what I want.  
> **username_1**: Got it... updated the answer.  

---

