Login with email (WP Modal Login)
I’m using this simple action, and it works like a charm. 🙂 <?php /** Plugin Name: (#111223) User Login with Mail Address */   add_action( ‘wp_authenticate’, ‘wpse111223_login_with_email_address’ ); function wpse111223_login_with_email_address( $username ) { $user = get_user_by_email( $username ); if ( ! empty( $user->user_login ) ) $username = $user->user_login; return $username; } It hooks to … Read more