"Add Existing Users" automation in MultiSite environment

My client has two websites inside a MultiSite network that he wants to work together in a certain way:
* Main Website (for all his customers; every customer has an existing user)
* Club Website (sub website with premium content for selected customers)

Right now we have a manually managed process between these two websites for a user of the main website requesting access to the club website, getting the approval and user access by an admin and having the logged in user fill a sign-up form on the club website. The new automated process should go like this:

1) Customers with an active user on the main website fill a request form (Gravity Forms) on the club website landing page to join to the club website.
2) If the user request can be approved (depends on certain conditions), the existing user on the main website should be added automatically on the club website so their can log in on the club site with the same credentials.
3) When the users are logged in on the club website, they can formally sign up for a club membership via another form (GravityForm) and another approval step would start.

At the moment an admin gets a mail, checks if the requester can be approved and then uses the WPMUDEV plugin "Add existing customers" to manually add users to the club website.
Now the customer wants a solution where he gets a request notification, then clicks a button "Approve" and then the user is added automatically to the club website.

I'm interested if anybody knows any solutions (plugins or custom code) to automate any of the steps of the process.
I am thinking about using GravityFlow (https://gravityflow.io/) to automate the approval process itself together with Gravity Forms but I have no idea how to automate the user access on the subsite.

The goal is that an existing user on the main website is added automatically to the club website (sub website of the MultiSite network) with one simple click by an admin.

I know it's very specific and don't have high hopes other than custom development but any easier suggestions would be appreciated.

  • Adam Czajczyk

    Hi Ocean Diveloper

    I hope you're well today and thank you for your question!

    I'm not familiar with GravityFlow so I'm not sure if it would work well here and how to use it such case but I tend to agree with mbitcon - it will most likely require at least some amount of custom development.

    There are some "parts" that could be automated with existing plugins but the point is to "tie that all up together" and include those additional forms that you need there (I understand they are necessary to gather some information as a base for approval).

    On a standard multisite users always register on "network level". Each registered user, after logging in, has actually a "subscriber level" access to all sub-sites, but is not a "real user" of any sub-site. What I mean by that is you'll see that you're logged in but you won't be on a "users" list on the sub-site.

    An easy way to "automate subsite registration" would actually be to use a plugin like "Network Subsite User Registration". Once you got it installed and network activated all you'd need to do would be to go to "Users -> Registration" page in your main site's dashboard, enable "Allow Users to Register" option and select a default role. Then do the same on that "club sub-site".

    What happens now is:

    1. A user can register directly on any of these sites (main or sub-site) and become a user of that specific site only
    2. if they log in to that site they're registered on and then visit dashboard of that other site, they are automatically added as a user to it. So, from now on they can login with the same username and password directly to any of these subsites.

    That would partially address the "first automation part" but there are two aspects missing: the form and approval. There are plugins like "WP Approve User" and "New User Approve" that could be activated on the "club subsite" only but they won't work when a logged in user is being automatically added. So, I guess this is the first part that would require some custom coding to make them work together.

    If you were able to achieve this, you could most likely just put a form on some landing page and admin would review form submissions before approving a member. Maybe even that could be automated - if you could "hack" that approval process, you could use either regular GravityForms or our own Forminator as they both provide an API. You can fetch form data via API so you can also "asses" it by code and trigger the "approval plugin" automatically. I believe.

    The second part of the "club registration" might actually be easier. I assume that this would give you some access to some content that's otherwise not available, right? I think our own Membership 2 Pro could be a solution here:

    https://premium.wpmudev.org/project/membership/

    You would want to enable it only on a club subsite. Then you would create two identical memberships there where one would be set to public and the other one as not public. If any content should be protected - the "non public" should give access to this content and the "public" one would be just "dummy". A user just signs up for that public membership (since user is already registered on site a username and password wouldn't change) and once admin sees that, admin can decide whether to approve that user or not. If decision is "approve", that user is manually assigned that "non public" membership that gives him/her access to protected parts of the site.

    There are ways to "hook up" to Membership 2 pro so that could most likely be automated in some parts either but I'm afraid that's still quite a bit of custom coding.

    That being said, I think some other Members of our community might also have some suggestions or better ideas so if you want me to, I can move this thread to our Members forum for further discussion. Just let me know if you want me to do this :slight_smile:

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.