Default option allow ‘username’ only to login in WordPress. Allowing login using email is a general approach in most cases and here is a quick code snippet to allow login in WordPress using email address as well username:
[code]
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’);
[/code]
You can also change ‘username’ label in to ‘Username / Email’ using:
[code]
function change_username_wps_text($text){
if(in_array($GLOBALS[‘pagenow’], array(‘wp-login.php’))){
if ($text == ‘Username’){$text = ‘Username / Email’;}
}
return $text;
}
add_filter( ‘gettext’, ‘change_username_wps_text’ );
[/code]
No change in core files is required and just by adding these in functions.php you can have provide more flexible login option to user.