Admin approval for new members in Membership 2 Pro?

I am thinking of installing Membership 2 pro. but before I do I need to know if it has a certain functionality that I have not been able to find in other plugins.

When someone joins, it needs to go to an admin for approval. Until the admin logs into the WP backend and approves the member joining, that person can’t access the protected pages on the site, AND their card will not be charged. So basically the person needs to sign up to join, but they can’t access content and Stripe won’t charge their card until the admin says “yes, this person is approved” by checking a box or something like that.

Is this possible with your plugin? Thanks!

  • Vaughan
    • Support/SLS MockingJay

    Hi Emily,

    Hope you’re well?

    Currently Membership 2 does not have this kind of functionality, I can certainly add this to the features list to see how popular it might be. I’m not sure if this could be done with a simple custom function, but I think it might be a bit too complex to alter. Let me just ask one of our developers for some assistance with this for you.

    Hope this helps

  • Angie
    • New Recruit

    I am looking for this as well! Also, if any of you have figured out the best way to do this, even if it’s another plugin, I would be grateful! I just need a simple plugin where

    1) A user could create an account

    2) The admin could either approve or reject the account

    3) Approved users have access to protected content.

    Thank you!

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    Unfortunately this isn’t possible i’m afraid.

    Deferred payment is definitely not possible as CC details would have to be stored on the WP DB, and that brings a whole other issue related to CC storage, PCI compliance and other stringent rules on doing so.

    An alternative way would be use a free membership, and for approval the admin moves the member to a paid membership but sets it to ‘expired’, which means the member needs to make a payment to re-activate it.

    Admin checks for new members in the free membership (i.e. via mail notification) and then moves the members to the paid plan, setting it to expired, then the users have to then pay & enter their details in order to activate the subscription.

    Hope this helps

  • Vaughan
    • Support/SLS MockingJay

    Hi Michael

    Good news, after testing, it worked flawlessly.

    Download the attached zipfile to your desktop then unzip it to your desktop.

    Now using FTP upload the enclosed folder: useractivation

    to the following location (using latest release of M2P)

    /wp-content/plugins/membership/premium/addons/

    Once done, you should see a new addon in the addons section

    Dashboard > membership > addons

    enable the user activation add-on.

    You will then see a new menu item called un-approved users

    Now when anyone signs up to a free membership plan (not the default membership, it has to be a standard membership that’s set to free)

    They will not have access until you manually approve them.

    Hope this helps

  • threadinc
    • Design Lord, Child of Thor

    Vaughan I’m actually in need of the exact same functionality. I’ve installed your addon but it doesn’t seem to be getting in the way of registrations. The one difference I do see is that I do not have a Premium folder, I have an app folder and then addons are within that folder. I am using the latest version of Membership 2 Pro.

    Any ideas?

  • Vaughan
    • Support/SLS MockingJay

    Hi Matt,

    Out of the box there isn’t a way. But we might be able to with some editing of the code.

    I have not tested this, so it might not work.

    Open up & edit the following file:

    /wp-content/plugins/membership/premium/addon/useractivation/class-ms-addon-useractivation.php

    Find the following function:

    /**
    * Redirect free members to a different page
    * so that admin can approve those users. Paid members will be
    * bypassed and the route is same as before/usual.
    *
    * @since 1.0.3
    */
    public function ms_model_event_save_event( $event, $data ) {
    $membership_id = $event->membership_id;
    $membership = MS_Factory::load( 'MS_Model_Membership', $membership_id );

    if( $membership->is_free )
    {
    update_user_meta( $event->user_id, self::META_SLUG, current_user_can( 'create_users' ) );
    }
    else
    {
    update_user_meta( $event->user_id, self::META_SLUG, true );
    }
    }

    Replace with the following;

    /**
    * Redirect free members to a different page
    * so that admin can approve those users. Paid members will be
    * bypassed and the route is same as before/usual.
    *
    * @since 1.0.3
    */
    public function ms_model_event_save_event( $event, $data ) {
    $approve_ids = array(100); // Seperate each id with a comma, these are id's of the membership plans you want to be approved
    $membership_id = $event->membership_id;
    $membership = MS_Factory::load( 'MS_Model_Membership', $membership_id );

    if( $membership->is_free && in_array($membership_id, $approve_ids))
    {
    update_user_meta( $event->user_id, self::META_SLUG, current_user_can( 'create_users' ) );
    }
    else
    {
    update_user_meta( $event->user_id, self::META_SLUG, true );
    }
    }

    Then add the membership_id of the plan or plans that are free & that need approval to the array() in the 1st line $approve_ids

    Hope this helps

  • ZeeMaster
    • Design Lord, Child of Thor

    Hi Vaughan,

    I know it has been a while since you provided this solution so I am sure with all the updates and stuff this would have changed. Is there an updated version of this addon available.

    I can install it and activate it, but when I create a user, although it does not grant the user access and keeps the content protected I cannot see the newly created user in unapproved members. And once logged in, it just locks in the whole website.

    Is there a fix for this. This is such a basic functional requirement. I am amazed how it is not part of the core plugin it self. Anyway please let me know, if there is a solution for this with you.

  • Vaughan
    • Support/SLS MockingJay

    Hi ZeeMaster

    Can you try this version attached.

    I haven’t tested fully, but it might not automatically work for existing users.

    But should work for any new users, & will work if admin also adds a user to a Free plan, then that user should then need approving. (even if admin moved them manually to a free plan)

    So for any existing users on the Free plan, you may need to remove them from the free plan, and then re-add them to the plan again. re-adding them again, should then show them in the un-approved page. So you’ll need to approve them.

    Hope this helps

  • Cousett @ Techie Mamma
    • Techie Mamma

    Thanks the file that Kasia provided removed the white screen on the admin side but when I go to unapproved members it is blank. Also from the member side when they sign up they are no longer able to get the content that should be accessible without a membership (general menu and content).

    When I go to the backend the unapproved member shows up in all members and not unapproved members. When I am logged in as that member they have access to nothing. So it is like a mix of it working and it being broken as there is no way to approve the new member.

    Please advise.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.