PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Buddypress & S2Member, restricting through uri

s2Member Plugin. A Membership plugin for WordPress®.

Buddypress & S2Member, restricting through uri

Postby isisjade » January 9th, 2011, 3:46 am

I've tried restricting Buddypress groups, activity, forums, and members through restrict URI as posted about here: viewtopic.php?f=4&t=538&p=2263&hilit=buddypress+groups%2C+activity#p2263

However, it's not working for me. Even though I have it set to restrict those areas of buddypress for Level 0, it's restricting even level 1,2,& 3 from viewing these sections, even though I've not set them to be restricted. When I remove these from the URI restriction, it opens buddypress so even a visitor can see groups and users. I want these sections locked down.

So it seems to either be a bug or a config issue on my side. Has anyone else ran into this problem implementing S2Member on Buddypress, and can you tell me how to solve this problem?
User avatar
isisjade
Registered User
Registered User
 
Posts: 1
Joined: January 9, 2011

Re: Buddypress & S2Member, restricting through uri

Postby gwc_wd » January 15th, 2011, 3:59 pm

I am using S2M with Buddypress and the URI restrictions:

/members/
/groups/
/forums/
/activity/

requiring level 0

and /create/

requiring level 1

I have no other restrictions for the other levels or elsewhere in S2M settings.

These are all working for me correctly.

The only difference I can see from your example is that I am enclosing the string in two / so I have
/groups/ while you have groups/

Note also that URIs are case sensitive so if you use /Groups/ it will not catch /groups/

So we would need more information to try to assist because what you are describing is not replicated -- at least not on my systems and I've fiddled with many convolutions of S2m +BP. What else might you have configured in S2M options that could be restricting access?
User avatar
gwc_wd
Registered User
Registered User
 
Posts: 18
Joined: June 27, 2010

Re: Buddypress & S2Member, restricting through uri

Postby Gayatriom » January 29th, 2011, 10:06 pm

Hey. I'm having this exact same problem.
I'm enclosing everything in two /members/ slashes.
I don't know what I'm doing wrong.
User avatar
Gayatriom
Registered User
Registered User
 
Posts: 21
Joined: January 28, 2011

Re: Buddypress & S2Member, restricting through uri

Postby Gayatriom » January 29th, 2011, 10:11 pm

/members/admin/messages/compose/
/members/admin/friend/add-friend/
/groups/create/
/forums/


This is what I have put in URI restriction.
However, everyone is able to access this!
User avatar
Gayatriom
Registered User
Registered User
 
Posts: 21
Joined: January 28, 2011

Re: Buddypress & S2Member, restricting through uri

Postby gwc_wd » January 31st, 2011, 11:47 am

Gayatriom wrote:However, everyone is able to access this!


When you say "everyone" do you mean anonymous users who are not logged in?

Are you logging out, clearing your cookies and cache before trying to access restricted pages? Have you tried accessing the restricted pages from a different computer -- sometimes I find that the computer I'm using for configuring keeps me logged in, in unexpected circumstances.

I can't think of anything obvious that would be the problem. Are you running any other plugins that deal with membership or capabilities?

Have you designated a Member Options page?

Try this: Remove all of your Membership restrictions -- so delete the URI restrictions. Go to the Page Restrictions. Select a page from the drop down menu and restrict it to level 0.

The log out, clear cache and cookies. Then try to access that specific page.

If you can access it then you do have a bigger problem. If it you can't then we've confirmed that S2M is actually operational and the problem may be isolated to the URIs.

Don't know if any of this helps, but I'm trying <smile>.
User avatar
gwc_wd
Registered User
Registered User
 
Posts: 18
Joined: June 27, 2010

Re: Buddypress & S2Member, restricting through uri

Postby GPMBuzz » March 2nd, 2011, 1:21 pm

Hello, finding similar.

I have set groups as private in buddypress but anybody can view my directory by adding /members/ to my url. Is there a way of specifying the url and requiring members to be registered and logged in to view?

Regards,

Gary
User avatar
GPMBuzz
Registered User
Registered User
 
Posts: 2
Joined: March 2, 2011

Re: Buddypress & S2Member, restricting through uri

Postby Mungo » September 5th, 2011, 8:08 am

I've been working on this and I discovered that depending on how your theme is set up (I am using Thesis) you may have to manually add in the code to force the URI check in your template code:

Code: Select all
<?php if(is_uri_permitted_by_s2member("/members/")) { ?>

BuddyPress template code

<?php } else {registration encouragement here} ?>


Took me a while to track this down so I hope this helps someone else
All the best
Mungo
User avatar
Mungo
Registered User
Registered User
 
Posts: 4
Joined: December 18, 2010

Re: Buddypress & S2Member, restricting through uri

Postby Cristián Lávaque » September 5th, 2011, 10:33 pm

I wasn't aware that some themes may interfere with the URI restrictions. Thanks for the heads up, Mungo. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Buddypress & S2Member, restricting through uri

Postby Mungo » September 6th, 2011, 5:45 am

Hi Cristián,

Since I posted this I have moved my install from the dev to the live server and the problem seems to have gone away! I am not sure what is causing this change in behaviour but it is probably a server setting.

Might be a red herring, i.e. my dev-server is configured in an odd way, and this is never an issue on live sites. Even so was an interesting exercise going through everything. If I ever get to the bottom of it i will return and post my findings. As it is, the code I added to force the check is never being called and S2Member is picking up on the URI restriction regardless.

Shrugs...
User avatar
Mungo
Registered User
Registered User
 
Posts: 4
Joined: December 18, 2010

Re: Buddypress & S2Member, restricting through uri

Postby Cristián Lávaque » September 7th, 2011, 2:18 am

Got it. I look forward to your update. Thanks! :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron