• Resolved StephenEquus

    (@stephenequus)


    Our business is a multisite and we partner with value added resellers and technology users all over the globe to help sell our products. We give users access to Marketing materials only they can access. They select the region/site they want access to so they can use the appropriate marketing material. For example, if you were in Europe, you would want access to the site that offers marketing material for Europe.

    We give them a registration/sign-in/log-in page and we approve them as a WordPress subscriber. Behind the scenes is code to prevents non-users from visiting this Marketing material page. What we discovered is the code will prevent ONLY non-users from seeing the marketing pages. Anyone who is a subscriber to our site can see the marketing materials for ANY region/site – and we don’t want that.

    We thought that functionality was built it, but as far as I can tell the functionality only prevents non-users and subscribers can see any marketing content on any region/site and not just the region/site we thought we were giving them access to.

    I read WordPress doesn’t offer this feature out of the box so we have to either use a plugin or write some code. What I am looking for is the php code for the “Sites” a user has selected in the Network Admin -> Users tab of WordPress. Although I could look into a Plugin, we already use quite a few and I would prefer to write the code needed to do this.

    Perhaps you can give me some direction so I can make some edits to the code and fix this issue. I think knowing the php that finds the “Sites” a subscriber is assigned to could be used to test in php is the user is logged in and if the user’s “Sites” matches the site they are actually trying to access. And if the user is on another site they aren’t assigned to, then when they try to access the Marketing materials for that site they instead get a link that redirects them to a register/log-in/sign-in page. Currently the only way to the Marketing materials is through a page that tests to see if the user is logged in. If so the link to the Marketing portal takes them there. Otherwise the link takes them to a register/sign-in/log-in page instead.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘restrict wordpress site subscribers access to secure content on multisite’ is closed to new replies.