Code to Disable Login by Email in WordPress - WPTRINITY

Code to Disable Login by Email in WordPress

WordPress allows users to login with username or email address both. You can easily disable login by email in WordPress by adding this code to your functions.php file.

remove_filter( 'authenticate', 'wp_authenticate_email_password', 20 );