Login-form wrong password – no error-message appears
-
Hello community,
when I typ a wrong password or wrong username/email no error-message “The username or password you entered is incorrect.” appears.
The website url only change to /?login=fail with the code
add_action( ‘wp_login_failed’, ‘my_login_fail’ );
function my_login_fail( $username ) {
$referrer = $_SERVER[‘HTTP_REFERER’]; // where did the post submission come from?
// if there’s a valid referrer, and it’s not the default log-in screen
if ( !empty($referrer) && !strstr($referrer,’wp-login’) && !strstr($referrer,’wp-admin’) ) {
wp_redirect( $referrer . ‘?login=failed’ ); // let’s append some information (login=failed) to the URL for the theme to use
exit;
}
}Maybe you have a solutions for this. Please help!
Thank you in advance.
Kind regards,
Johannes
- The topic ‘Login-form wrong password – no error-message appears’ is closed to new replies.