Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is it possible to remove the username field from the registration page?

I want the users to enter only their email and password.
A new user should be created based on these two parameters only.

Is that possible and if so, how?

share|improve this question
    
This do it? wordpress.org/extend/plugins/wp-email-login –  saltcod May 16 '12 at 12:30
add comment

1 Answer 1

I think any solution to this request is going to be a 'hack' as wordpress requires that there be a username for all registered users. Even the plugin mentioned above is most likely just finding the username via the email address, and then using that username to login to the site.

If you are okay with a hack, here is a concept that could work:

1) Pre-populate the username field in your registration form with a unique number, using the current timestamp is a good idea to avoid ever getting any duplicates. You would then hide this field so that the user does not see it on the screen when filling out their form.

If you are using jQuery you could use something like:

$(document).ready(function() {
    var timestamp = (new Date).getTime();
    $('form input.username').val(timestamp);
    $('form input.username').css('display', 'none');
});

In this example, 'form input.username' would be the jQuery selector to find the username field, you will need to check the html structure on your page to make sure the selector matches the structure.

2) Use a plugin like the one mentioned earlier (http://wordpress.org/extend/plugins/wp-email-login/) to allow users to login with their email address.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.