Allow users to register using an email address. Users can then log-in using their email address and password for authentication.

This module aims to solve some usability issues in managing accounts on a Drupal site.

  1. On many sites the idea of a "username" is not necessary while the email is necessary. This module lets users register and login using only their email address and not worry about a username.
  2. In general the fewer fields on a form the easier it is for people to finish the task. This module lets sites use just an email for registration form. How simple is just one form? So simple.
  3. This module can be configured to allow a username as well for sites where that is important. In these cases, users get the benefit of being able to login with username or email which is helpful in case a user tries to login with their email (they are likely to remember their email even if they forgot their username).

By default, a username is generated and assigned based on the user name part of the email address and their user ID. Sites that want to create usernames in their own way can do so by implementing hook_email_registration_name_alter.

Username save logic changed in 2.x

The username save logic changed from 8.x-1.x to 2.x! This leads to unexpected results in some cases, see #3400954: Request for feedback: Should username change on user login or save
Until that issue is solved, we suggest not upgrading to 2.x if you were using 8.x-1.x before. See the issue for details and progress.

Email Registration Username
The "Email Registration Username" submodule will use your email address as your username on registration and sync both fields on updating the user (if they were synced before, making sure users with the right permission can still set a different username if needed).

Note: usernames can easily be leaked! Therefore, if you are using the submodule, your users email addresses might be leaked!
There is an obfuscation logic in place, which obfuscates the username (aka mail address) for users without the right permission. Although, this only obfuscates every call of "$account->getDisplayName()". The username might still be passed raw and could be leaked.

Installation Instructions:

Enable the module as you normally would.
You will probably want to change the welcome e-mail (Administer -> User Management -> User Settings) and replace instances of the token !username with !mailto

The automatically generated username is still displayed name for posts, comments, etc. You can allow your users to change their username by going to:
(Administer -> User Management -> Access Control) ... [X] change own username
This privilege allows a user to change their username in "My Account".

Related modules:

  • passwordless allows logging in without using a password.
  • Real Name allows the administrator to choose fields from the user profile that will be used to show instead of the username.

Alternative modules

  • Mail Login provides a similar functionality to this module and is an alternative module

Modules that are believed to conflict with Email Registration:

Supporting organizations: 
Ongoing maintenance of the 7.x branch
Ongoing maintenance of the 8.x+ branch
Support 10+

Project information

Releases