Membership 2 Protection Rules not working properly

@@adminadminI have set the rules for menu a few different ways trying to get them to work even using the Addon. The rules seem not to work properly for menus and memberships.

Doing test registration and menus not changing upon sign in.

I have also added protection for url my wp-signup.php and it still allows visitors to access. Tested on multiple computers and still allowing signups.

1. is there a bug or fix for the protection rules I need to know about?
2. Is there a way to protect sites from blog signups from visitors using Membership 2?
3. FYI by typing "2" and "?" together it shows all members to be tagged for message. Might want to look into that for questions about Membership 2... Just FYI

Kindly,

Paul

  • Patrick

    Hi there @Paul

    I hope you're having a great day!

    I just did a bit of quick testing on my own sandbox site and can confirm that the Overwrite Contents of Menu Location rules actually seem to work the opposite way they were intended to, whoops.

    When set up as the screenshot below, logged-in members should see "Menu 1", while not logged-in visitors should see the default menu I have set at Appearance > Menus. It actually does the opposite: not-logged-in visitors see "Menu 1", while logged-in members get the default. I've notified the developer of this so he can investigate the issue.

    As for wp-signup.php, that is actually one of the URLs that cannot be protected. To disable that page, set Allow new registrations to Registration is disabled in your network admin.

    That will not interfere with Membership2 functionality, but it will redirect visitors to the wp-login.php with a message that registration is not allowed.

  • Paul

    @adminOk,
    How do I offer bloggs?
    If it needs to be turned off completely, how can my new members get blogs?

    I need to offer FREE blogs to my members. Any suggestions?

    Another big bug: When change network settings to 'Logged in users may register new sites'. It totally disables Membership 2 registration and says, Registration is currently not allowed.

    So I can't offer blogs if I use Membership 2?

  • Sajid

    Hi @Paul! Hope you are doing good today :slight_smile:

    How do I offer bloggs?
    If it needs to be turned off completely, how can my new members get blogs?
    I need to offer FREE blogs to my members. Any suggestions?

    If you want to offer free blogs to your members only then we can have a redirect on this page if a user is not logged in. Redirecting to a custom page on your website where you can provide some details to signup as Membership 2 Pro user to be able to create your free blog etc.

    To do this add below code in functions.php file or use mu-plugin.

    add_action('init','possibly_redirect');
    
    function possibly_redirect(){
     global $pagenow;
     if( 'wp-signup.php' == $pagenow and !is_user_logged_in() ) {
      wp_redirect('http://google.com/');
      exit();
     }
    }

    Change the URL with you own page URL where you want to redirect or even on homepage.

    Another big bug: When change network settings to 'Logged in users may register new sites'. It totally disables Membership 2 registration and says, Registration is currently not allowed.

    Change this setting back to Allow new registrations and add the above code. Hopefully it will fix your problem.

    Cheers, Sajid

  • Paul

    @Sajid

    Thank you so very much for your diligent support!
    I was given a redirect function and shortcode earlier today, which redirects members to signup after registration.

    Can you or anyone assist me in changing this function to redirect to wp-signup.php (NOT ONLY) after registration. But just regular shortcode so I can take my members through the setup process before they reach wp-signup.php?

    I may be reading it wrong because I am a newb at all of this, but here is the code:

    if(!function_exists('wpmu_auto_redirect_to_signup_after_ms')):
    
    function wpmu_auto_redirect_to_signup_after_ms() {
    	wp_redirect('http://paidlinksnetwork.com/wp-signup.php');
    	exit;
    }
    add_shortcode( 'wpmu_auto_rdts', 'wpmu_auto_redirect_to_signup_after_ms' );
    
    endif;

    Kindly,

    Paul

  • Sajid

    Hi @Paul! Hope you are doing good and you are welcome :slight_smile:

    I am not sure what the process is and also can you post the link of thread where you have been given this code snippet. So I know the background and provide you a suitable code.

    Also as long as your original problem is resolved so its better to mark this thread resolved and continue discussion on your other related thread or start a new thread and if necessary include the links of threads that are related to the problem.

    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.