latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Buddypress profile redirect – open access

Home Forums Community Forum Buddypress profile redirect – open access

This topic contains 8 replies, has 3 voices. Last updated by  Cristián Lávaque 3 years, 9 months ago.

Topic Author Topic
Posted: Wednesday Mar 27th, 2013 at 2:30 pm #45886

So, I have everything working perfectly with my integration of Buddypress and s2Member, and my members on login are being redirected to their individual profile (e.g. http://www.sitename.com/members/username). However, by setting this as my redirect page after login, s2member automatically locks down http://www.sitename.com/members, which is how I believe it is supposed to work (not sure why it also doesn’t lockdown everything beyond that, such as the profile, but I’m not particularly concerned with that).

Is there a way to keep http://www.sitename.com/members/username as my after login page, but keep http://www.sitename.com/members publicly available?

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Thursday Mar 28th, 2013 at 5:22 pm #46001
Bruce
Username: Bruce
Staff Member

Is there a way to keep http://www.sitename.com/members/username as my after login page, but keep http://www.sitename.com/members publicly available?

I do not believe this is the intended behavior here. Check your page’s restrictions, and make sure you do not have any URI restrictions set up for this URI here:

Dashboard -› s2Member® -› Restriction Options -› URI Access Restrictions

Posted: Thursday Mar 28th, 2013 at 6:02 pm #46002

There are no restrictions anywhere. Just to be clear:

If I redirect users to their profiles after login (/members/username/), then any non-logged in attempt to access /members/ takes you to the membership options page. However, if I remove this and make the login redirect page something else (/somethingorother/), /members/ becomes publicly available again (does not automatically take a logged out user to the membership options page).

Posted: Friday Mar 29th, 2013 at 4:49 pm #46089
Bruce
Username: Bruce
Staff Member

Thanks for the clarification.

I’ll contact Jason (Lead Developer) to see if there is a way to disable this from happening.

Posted: Saturday Mar 30th, 2013 at 5:17 pm #46166

Marcus, how are you doing it? With the replacement code for the username in the Login Welcome Page redirection URL?

http://www.sitename.com/members/%%current_user_login%%/

When you do that, s2Member doesn’t restrict access to /members/.

Posted: Sunday Mar 31st, 2013 at 4:43 pm #46216

I’m afraid that’s exactly how I have it set up, and that’s exactly what’s happening. You can publicly access profiles, but not the members directory (http://www.sitename.com/members/). It just redirects to the membership options page.

Posted: Monday Apr 1st, 2013 at 12:21 am #46246

Ah, I see, that’s the BuddyPress public directory of users…

Well, I don’t think the public profiles are WP pages and s2Member wouldn’t restrict those then.

You could protect them with the URI restriction so they aren’t public, if that’s what you want. [hilite path]Dashboard -› s2Member® -› Restriction Options -› URI Access Restrictions[/hilite]

Of course, if you do that, you’d most likely use [hilite mono]/members/[/hilite] which would restrict access to [hilite mono]/members/[/hilite] too, not just the profiles.

I’m sorry, the access restrictions with BuddyPress are limited to what the URI restriction can do.

Posted: Monday Apr 1st, 2013 at 10:03 am #46274

I still think there is some confusion on this. “Members” is a page that displays in the pages list. It is also the page used by Buddypress.

If I set

http://www.sitename.com/members/%%current_user_login%%/

as the url to redirect to on login, then the page “Members” (/members/) is no longer publicly available (users get redirected to the membership options page). If I set the url to redirect to to something else (the contact page, or something), then /members/ does not get locked down to the public.

What I would like to happen is:
1. Users profiles are public (which they are currently)
2. Members directory is public (which it is currently not for reasons described)
3. Users are redirected to their profile on login.

This isn’t really a “make it or break it” feature for me, just an odd behavior that I’d like to see if there is a solution to.

Posted: Monday Apr 1st, 2013 at 11:55 pm #46334

I understand.

Well, s2Member will always try to protect the Login Welcome Page at Level 0, since it’s a page to be shown to a logged in user. So if you want to keep a page public, don’t se it as the Login Welcome Page.

If you want to show the user a profile, then you can point him to /wp-admin/profile.php, or create a new profile form with s2Member in a WP page. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Member Profile Modifications[/hilite]

If you really need to redirect the user to the public profile page and leave it public, then you could customize your login link the [hilite mono]redirect_to[/hilite] variable, which will override the Login Welcome Page in s2Member. This video talks about that: Video » s2Member (Login Welcome Page Conflicts?)

Viewing 8 replies - 1 through 8 (of 8 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.