• Hi there,

    I would like to lock the frontend and redirect non-logged in users to the login url. The thing is that there is probably a redirect conflict, when the captcha is enabled and the user can never reach the normal wp-login.php, despite the successful captchas. Here is the redirect:

    add_action( 'template_redirect', 'boom_unlogged_users' );
    
    function boom_unlogged_users() {
       if ( ! is_user_logged_in() ) {
         wp_safe_redirect( wp_login_url() );
         die;
       }
    }

    I would appreciate any solution to overcome this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Unfortunately, it can’t work. The brute force protection works before WordPress, hence right after the captcha, the user is sent to the login page and you’ll get a loop. You would need to disable the brute-force protection and simply use a captcha plugin instead, which will load after WordPress.

    Thread Starter margarita – boomCodes

    (@margaritaperc)

    OK, understandable!
    Thanks for the quick response.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Brute force and redirect non-logged in users’ is closed to new replies.