I have a custom login page that submits the form to /wp-login.php because I don’t want to duplicate the latter’s functionality.
I hook on wp_login_failed to redirect back to the custom login page when wrong credentials are entered, but when either field is left empty, the wp_login_failed action is not called – obviously WordPress bails out at form validation stage, before the data are sent to the routine that does the actual login and would eventually do_action(‘wp_login_failed’)
So the question is, how do I catch the login form validation failure without duplicating much of /wp-login.php? Is there some undocumented hook somewhere?
- The topic ‘Custom login page – catch login form validation failure?’ is closed to new replies.