Use email address as userid


I have installed and activated membership plugin. I wanted to customize the signup screen so that the email-address of the user is used as user id so the signup form is simplified to just two fields, email address and password. Is this doable.


  • DavidM
    • DEV MAN’s Mascot

    Hi Bhavi,

    I couldn't really see a way to do that apart from editing the core registration forms. To do that though, you can edit one of the following two, depending on whether you're using BuddyPress:

    You can easily hide the "user_login" form field by changing it to a hidden type like so:
    <input type="hidden" value="<?php echo esc_attr($_POST['user_login']); ?>" class="regtext" name="user_login"></p>

    And you could use javascript to change the "user_login" value based on any changes to the "user_email" value, though getting that javascript included in that page may require a bit of work, unless you don't mind including it in your theme's header.

    I'll ask the developer if there's a simpler way though.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.