Jetpack_Protect_Module::block_with_math PHP Method

block_with_math() public method

public block_with_math ( )
    function block_with_math()
    {
        /**
         * By default, Protect will allow a user who has been blocked for too
         * many failed logins to start answering math questions to continue logging in
         *
         * For added security, you can disable this.
         *
         * @module protect
         *
         * @since 3.6.0
         *
         * @param bool Whether to allow math for blocked users or not.
         */
        $this->block_login_with_math = 1;
        /**
         * Allow Math fallback for blocked IPs.
         *
         * @module protect
         *
         * @since 3.6.0
         *
         * @param bool true Should we fallback to the Math questions when an IP is blocked. Default to true.
         */
        $allow_math_fallback_on_fail = apply_filters('jpp_use_captcha_when_blocked', true);
        if (!$allow_math_fallback_on_fail) {
            $this->kill_login();
        }
        include_once dirname(__FILE__) . '/protect/math-fallback.php';
        new Jetpack_Protect_Math_Authenticate();
        return false;
    }