[buddypress-trac] [BuddyPress Trac] #6145: BP 2.2 beta 2 - member-type can be changed by member on their extended-profile page

buddypress-trac noreply at wordpress.org
Wed Jan 21 15:40:38 UTC 2015


#6145: BP 2.2 beta 2 - member-type can be changed by member on their extended-
profile page
-------------------------+-----------------------------
 Reporter:  chubbycrow   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  low          |   Milestone:  Future Release
Component:  Members      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+-----------------------------

Comment (by boonebgorges):

 > A possible enhancement for the future would probably be to include some
 filterable capabilities when registering the member_types taxonomy.

 Yes, that's not a bad idea.

 I agree with what DJPaul has said here. Let's try to do something like
 this for 2.3. In the meantime, here's some sample code that you can adapt
 to hide the metabox from certain users. In this case, I'm allowing only
 'bp_moderate' users (ie, admins) to view it, but you can do whatever you'd
 like.

 {{{
 function bp6145_remove_member_type_metabox() {
         if ( current_user_can( 'bp_moderate' ) ) {
                 return;
         }

         remove_meta_box( 'bp_members_admin_member_type',
 get_current_screen()->id, 'side' );
 }
 add_action( 'bp_members_admin_user_metaboxes',
 'bp6145_remove_member_type_metabox' );
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6145#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list