• Resolved Masoud

    (@masoud1111)


    i am using a theme, built in buddypress plugin.
    as default when i activate bp, the normal login page should be override,
    so where ever you are coming from , u must go to bp signup form.

    now i do have a activated bp, and if you try to signup from the button (signup button which will redirect you to bp signup form) , u will see the bp signup form [ which is normal behavior ]

    but if you type the https://www.yourwebsite.com/signup
    directly from url field and press Enter, the bp signup page will be override
    and you will be redirected to the default theme signup form! (which u should not see! because i had activated bp)!

    and worst is , even if you’ve disabled EveryOne can Register, they still can access the signup form from typing directly in url, and they can signup!! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Masoud,

    Please add following code in your themes functions.php file :

    add_action('init', 'cedcommerce_prevent_signup');
    
    function cedcommerce_prevent_signup()
    {
        $signup_page = $_SERVER['REQUEST_URI'];
        if (strpos($signup_page, 'signup') !== false)
        {
            $cedcommerce_signup = get_option('users_can_register');
            if($cedcommerce_signup == 1)
            {
                wp_redirect(home_url('your-new-signup-page');
                exit;
            }
        }
    }

    hope it will works, If not then please contact us on [email protected] so that we can figure out the exact solution

    Thanks
    CedCommerce

    Thread Starter Masoud

    (@masoud1111)

    hi CedCommerce.
    many thanks for your help and attention.
    i put that code in action, but it seems that my problem is something esle.
    i some how managed it myself.
    there was a code in my sinup template, which defines that if the bp is activated then redirect the user with wp_redirect … to the bp signup page.
    the eror was from that part.
    i corrected the if statement. and it seems to work alright now.
    but thankssss to you for your notice and time.

    Your welcome Masoud

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘2 signup page at the same time!’ is closed to new replies.