miya0001/force-email-login — pull request #1 by chrisvanpatten (2014-07-16 18:18:18+00:00)
Title: Remove (seemingly) unneeded is_email() check and wp_die() message

Hi there -

Thanks for the great plugin! It's fast and easy, and works really smoothly.

I'm curious why you chose to check `is_email()` on line 24 in force-email-login.php, when that check is already being done in the `$this->authenticate()` method (line 45). Doing the check there and executing a `wp_die()` isn't a very user friendly option, because it gives the user no option to get back to the login page. The "Auth failed." error could be harder for non-technical users to understand too.

If you remove the check, logins are still prevented when users try to login with a username. Further, instead of redirecting the user to a `wp_die()` page, they get redirected back to the login page, which will display a more helpful error message ("ERROR: Invalid username or incorrect password").

The pull request included here removes the unneeded check (lines 24 and 25). No further changes are necessary to display the error; WordPress handles that automatically.

Thanks again!