Community Support Forums — WordPress® ( Users Helping Users ) — 2011-06-25T01:27:34-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=10241 2011-06-25T01:27:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10241&p=21673#p21673 <![CDATA[Re: Dev'l Question: Does S2member check for role or capbilit]]> Thanks for the excellent question.
I can't say that this configuration is going to work fully as expected in all aspects of s2Member, because s2Member DOES expect all "Members" to have one of the s2Member Roles, and/or the Subscriber Role. But in the specific scenario that you pointed out, you could try this hack to get things working.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_action
("ws_plugin__s2member_before_custom_fields_configured_at_level", "my_function");
function my_function($vars = array()){
if(
current_user_is("board_member"))
   $vars["__refs"]["level"] = 2;
}
?>

Statistics: Posted by Jason Caldwell — June 25th, 2011, 1:27 am


]]>
2011-06-22T20:53:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10241&p=21474#p21474 <![CDATA[Re: Dev'l Question: Does S2member check for role or capbilit]]> Statistics: Posted by dwdutch — June 22nd, 2011, 8:53 pm


]]>
2011-06-22T00:59:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10241&p=21372#p21372 <![CDATA[Re: Dev'l Question: Does S2member check for role or capbilit]]> Statistics: Posted by Cristián Lávaque — June 22nd, 2011, 12:59 am


]]>
2011-06-21T22:13:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10241&p=21350#p21350 <![CDATA[Dev'l Question: Does S2member check for role or capbility?]]>
In addition I have a special capability for which i want a handful of my S2member Level 2 users to have access. Since the majority with that role will NOT have access to the new capability, I left the s2member Level 2 role untouched and I created a new role (called Board Member) to which I assigned my one additional special capability PLUS all of the same capabilities as the s2member Level 2 role (i.e. ACCESS_S2MEMBER_LEVEL0, ACCESS_S2MEMBER_LEVEL1 and ACCESS_S2MEMBER_LEVEL2).

HOWEVER, I noticed that those assigned the new role (i.e. Board Member) cannot complete changes in their USER PROFILE for the Custom Registration Fields. The fields are visible in the USER PROFILE but when the user changes the field then submits the page, the field changes are NOT saved.

So, my questions...

To accept User Profile changes, does S2member rely on checking the ROLE of the user -or- on checking the ACCESS_S2MEMBER_LEVEL2 capability?

Is there a work-around to allow a new role that includes the ACCESS_S2MEMBER_LEVEL2 capability to still complete changes in the Custom Registration Fields of the USER PROFILE?

I have S2member Version: 110620 and WP 3.1.3

Statistics: Posted by dwdutch — June 21st, 2011, 10:13 pm


]]>