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™

Restricting profile.php?

s2Member Plugin. A Membership plugin for WordPress®.

Restricting profile.php?

Postby fcandillo » July 12th, 2011, 9:32 pm

I have free subscribers at Level #0 access.

However, I don't want to allow them to access their profile.

I tried using the
URIs That Require Level #1 Or Higher:
/profile.php

however, it seems I can't restrict access this way.

How can I restrict access for Level #0 to the /wp-admin/profile.php ?
User avatar
fcandillo
Registered User
Registered User
 
Posts: 10
Joined: July 12, 2011

Re: Restricting profile.php?

Postby Cristián Lávaque » July 13th, 2011, 2:54 am

s2Member restrictions don't apply to the admin side of WordPress. You could look inside /wp-admin/user-edit.php and find a hook that lets you do this.
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: Restricting profile.php?

Postby fcandillo » July 15th, 2011, 8:49 am

Using the "Front-End Users" plugin, I found that I could restrict access for different roles to the /wp-admin/ area. Since the 'Subscriber' role is equal to 's2Member Level 0', I don't allow 'Subscriber' Roles with Admin Access.

I am also using the "Sidebar Login" plugin. It allows me to place different links depending on role capabilities. I used the "User Role Editor" to create a custom capability of 'profile_no' and gave this capability to the 'Subscriber' role.

Then, with the "Sidebar Login" plugin, I created a link to the profile.php page for those with 'access_s2member_level1' capability and a link to the login-welcome page for those with 'profile_no' capability.
User avatar
fcandillo
Registered User
Registered User
 
Posts: 10
Joined: July 12, 2011

Re: Restricting profile.php?

Postby Cristián Lávaque » July 16th, 2011, 12:01 am

Oh, very cool. Thanks for sharing how you did it. :)

Does https://wordpress.org/extend/plugins/front-end-users/ show s2Member's custom registration fields in the profile page it creates?
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: Restricting profile.php?

Postby fcandillo » July 16th, 2011, 6:22 am

No, unfortunately it does not show s2Member's custom registration fields in the profile page. I will have to customize that somehow.
User avatar
fcandillo
Registered User
Registered User
 
Posts: 10
Joined: July 12, 2011

Re: Restricting profile.php?

Postby Cristián Lávaque » July 16th, 2011, 5:35 pm

Ah ok. Search the forums, there have been a few hacks posted related to custom fields, they should help you with this. :)
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], Yahoo [Bot] and 1 guest

cron