Make WordPress User Name the Email Address

Shae picture Shae · Jan 18, 2012 · Viewed 21.8k times · Source

Is it possible to make WordPress user name the Email Address?

So unername could be hidden or not required and is replaced with email address.

I know there are plugins that can allow users to use their email as the log in, but they still have to enter the username when they register. I want to try and do away with the username.

Answer

Chris Ferdinandi picture Chris Ferdinandi · Sep 16, 2013

I know this thread is over a year old now, but I just tested creating an account where the username is an email address and it works. In theory, you could create a front-end signup form that saves the email variable to both the username and email fields in the database.

WordPress allows usernames with some special characters, so this is a completely valid way to sign people up: http://codex.wordpress.org/Function_Reference/sanitize_user