By default WordPress only allows you to log in using your username. If your site allows anyone to register (for whatever reason), it is always handy to give your users the option to login using their email address too. Simply copy and paste the below code into your funcions.php file to allow users to login using their email address as well as their username.
function login_with_email_address($username) { $user = get_user_by_email($username); if(!empty($user->user_login)) $username = $user->user_login; return $username; } add_action('wp_authenticate','login_with_email_address');