• The plugin does not work (no captcha form shown) for multisite signup pages, e.g:

    example.com/wp-signup.php

    This page is always redirected to when trying to signup with regular page (which is well supported by the plugin):

    example.com/wp-login.php?action=register

    The code that causes this issue located in includes/class-core.php:

                    if ( Math_Captcha()->options['general']['enable_for']['registration_form'] && ( ! is_user_logged_in() || (is_user_logged_in() && ! Math_Captcha()->options['general']['hide_for_logged_users'])) && $action === 'register' ) 
            {
                // Check IP rules
                if (Math_Captcha()->options['general']['ip_rules'])
                {
                    $geo = new MathCaptcha_GEO();
                    if ($geo->checkIP_in_List(false, Math_Captcha()->options['general']['ip_rules_list'])) return; // Dont show captcha
                }
                // Check GEO rules
                if (Math_Captcha()->options['general']['geo_captcha_rules'])
                {
                    $geo = new MathCaptcha_GEO();
                    if (isset(Math_Captcha()->options['general']['hide_for_countries'][ $geo->getCountryByIP(false) ])) return; // Dont show captcha
                }
                
                            add_action( 'register_form', array( $this, 'add_captcha_form' ) );
                            add_action( 'register_post', array( $this, 'add_user_with_captcha' ), 10, 3 );
                            add_action( 'signup_extra_fields', array( $this, 'add_captcha_form' ) );
                            add_filter( 'wpmu_validate_user_signup', array( $this, 'validate_user_with_captcha' ) );
                    }
    

    It appears that wp-signup.php does not use $action === ‘register’

  • The topic ‘Does not work for multisite registration’ is closed to new replies.