wp-login.php accessible with blank information
-
Hello Georgian [redacted], how are you?
After a few months using the plugin without any problems with the following script in functions.php, a doubt came up, and it became a necessity.
/* redirect original wp-login.php script */ function wppbc_free_default_login_redirect() { $login_page = 'LOGIN_PAGE_URL'; $register_page ='REGISTER_PAGE_URL'; $password_recovery_page = 'PASSWORD_RECOVERY_PAGE_URL'; $page = basename($_SERVER['REQUEST_URI']); if( $page == "wp-login.php" && $_SERVER['REQUEST_METHOD'] == 'GET') { wp_redirect($login_page); exit; } else if ($page == "wp-login.php?action=register") { wp_redirect($register_page); exit; } else if ($page == "wp-login.php?action=lostpassword") { wp_redirect($password_recovery_page); exit; } if( $page == "wp-admin" && $_SERVER['REQUEST_METHOD'] == 'GET') { wp_redirect($login_page); exit; } } add_action('init','wppbc_free_default_login_redirect');
When a user sends incorrect or blank login information, is it possible to redirect him back to the login page of the plugin instead of the wp-login.php page?
Is it possible to supplement the script mentioned above?
Thank you very much!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wp-login.php accessible with blank information’ is closed to new replies.