Hide Profile Group Tab from Admin if Level 1 (s2Member)
-
Hello,
I have 2 s2member levels, and quite a bit of groups for each level, it’s getting confusing for the admin when editing. I’d like to hide some of the groups from the admin in the EDIT section if the user is in a specific level.
I found this below and tweaked it for s2member, but alas it doesn’t work LOL, if anyone can help, would greatly appreciate it!!
// Hide profile group to admin based on Levels function bpfr_hide_profile_field_group( $retval ) { if( current_user_is(administrator) && current_user_can("access_s2member_level1") ) { // exlude groups, separated by comma $retval['exclude_groups'] = '6,5'; } return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_field_group' );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hide Profile Group Tab from Admin if Level 1 (s2Member)’ is closed to new replies.