I want login using email not username wordpress front end
remove_filter('authenticate', 'wp_authenticate_username_password', 20);
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');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire