Log In With Email Address Only
Accepts only an email address and password on the login form. Usernames are rejected, which makes guessing logins harder.
Opens WPIDE on
Code
remove_filter( 'authenticate', 'wp_authenticate_username_password', 20 );
add_filter( 'gettext', function ( $translation, $text ) {
if ( 'Username or Email Address' === $text ) {
return 'Email Address';
}
return $translation;
}, 10, 2 );
Notes
Do not combine with "Log In With Username Only", or nobody will be able to log in.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.