Page 1 of 1

Restricting Profile URI

PostPosted: January 24th, 2012, 3:59 pm
by bitofgrace
Hi there,
I recently had to re-do all my s2 settings because of a breakdown in mySQL

How do you restrict non-members from viewing buddypress member profile page?

i thought it was
/%%user_login%%

but that is not working, nor is
/%%user_login%%/profile/

-grace

Re: Restricting Profile URI

PostPosted: January 24th, 2012, 4:00 pm
by Bruce C
You need to go into Restriction Options -> URI Restrctions

Re: Restricting Profile URI

PostPosted: January 24th, 2012, 4:04 pm
by bitofgrace
YEs Bruce, thank you, I know where - what i need to know is what is the correct way to distinguish the URI??

the two i mentioned above are not blocking public from viewing individual profile pages.

-grace

Re: Restricting Profile URI

PostPosted: January 24th, 2012, 4:09 pm
by Bruce C
Oh, OK well you should just be able to use /profile/ because it shows up regardless I believe. There's no Replacement Code for everyone's login.

Re: Restricting Profile URI

PostPosted: January 24th, 2012, 4:14 pm
by bitofgrace
hmm
then something is not working perhaps.
It used to work well.
But now if i type in the exact address.. i get in even while not logged in as a member.

-grace

Re: Restricting Profile URI

PostPosted: January 24th, 2012, 4:16 pm
by Bruce C
Can you send the URL of the member you are trying to access?

Re: Restricting Profile URI

PostPosted: January 24th, 2012, 4:18 pm
by bitofgrace
Any member at all
but here's my testing account:

http://video.icu2.com/bitofgrace

Re: Restricting Profile URI

PostPosted: January 24th, 2012, 4:23 pm
by Bruce C
OK, I've done a job similar to this one before. This actually isn't possible through s2Member directly because of how BuddyPress works with the usernames. You'd need to run a PHP function that checks the URI, and sees if the URI contains the username of a user, and checks if the current user is under level 0. It's actually quite complicated, which is probably why s2Member hasn't integrated it yet.