[buddypress-trac] [BuddyPress Trac] #6188: Member Types API: remove a user's member type

buddypress-trac noreply at wordpress.org
Thu Feb 5 10:27:05 UTC 2015

#6188: Member Types API: remove a user's member type
 Reporter:  Offereins            |      Owner:
     Type:  enhancement          |     Status:  new
 Priority:  normal               |  Milestone:  Awaiting Review
Component:  Component - Members  |    Version:  2.2
 Severity:  normal               |   Keywords:  has-patch
 I find myself missing a simple method for removing a certain user's member
 type, especially for situations where a user has multiple member types.
 Passing an emtpy value to `bp_set_member_type()` removes *all* member
 types. You cannot specify which one you'd like to remove.

 Attached patch introduces `bp_remove_member_type( $user_id, $member_type
 )`, which is a possible solution that handles associated cache
 manipulations and hooks. This should fill the gap where plugin devs are
 building their own implementations. I'm not sure how this ties together
 with the mentioned use of `bp_set_member_type( $user_id, '' )`, but it is
 a start.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6188>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list