Use email address as username Is there a specific or preferred way to set the username for new user registrations to be their email address?

At the moment my user signup form contains both fields:

&lt;!-- Username --&gt;
  &lt;label for="username"&gt;Username&lt;/label&gt;
    &lt;input type="text" id="username" name="username" placeholder="joesmith" {%- if account is defined %} value="{{ account.username }}"{% endif -%}/&gt;
    {% if account is defined %}
        {{ _self.errorList(account.getErrors('username')) }}
    {% endif %}

&lt;!-- Email --&gt;
  &lt;label for="email" &gt;Email&lt;/label&gt;
    &lt;input type="text" id="email" name="email" {%- if account is defined %} value="{{ account.email }}"{% endif -%}/ autocapitalize=off autocorrect=off&gt;
    {% if account is defined %}
        {{ _self.errorList(account.getErrors('email')) }}
    {% endif %}
I believe you're looking for the conveniently named useEmailAsUsername config setting.

When that is set to true, any new user that is saved with a valid email address will have that copied over to the username field as well.