How to Login using email ID in WordPress

Posted in: WordPress No Comments

By default WordPress allow users to login only using their username. But sometimes you may find remembering username little difficult, and remembering email ID easy.

In this tutorial I will show you how you can allow users to login using their email ID or Username on a WordPress website. Users can use either username or registered email ID to login.

Step 1:
Open functions.php file of your active theme in a text editor.

Step :
Add following code at bottom.

function login_with_email_address($username) {
 $user = get_user_by_email($username);
 $username = $user->user_login;
 return $username;

Save file. Done!!!

About the Author

Name: Ravi Shekhar
I love learning and sharing web stuffs.

Share this post

Twitter Facebook Google Buzz Digg StumbleUpon Delicious Technorati

Leave a Reply