[buddypress-trac] [BuddyPress Trac] #6597: Targeting the 'groups_leave_group' action can be difficult

buddypress-trac noreply at wordpress.org
Fri Aug 21 20:12:26 UTC 2015

#6597: Targeting the 'groups_leave_group' action can be difficult
 Reporter:  thebrandonallen         |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Component - Groups      |     Version:  2.3.0
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
Changes (by r-a-y):

 * keywords:  dev-feedback => dev-feedback has-patch


 > However, the groups_leave_group and groups_remove_member are very
 similar. The only difference being that one is initiated by the individual
 user, while the other is initiated by a group/site admin.

 Good catch, thebrandonallen.

 `groups_remove_member_tweaks.patch` is an attempt to consolidate all these
 different hooks under the `groups_remove_member()` function.  It's not
 pretty by any means, but it should separate the use of the
 `'groups_remove_member'` and `'groups_leave_group'` hooks.

 It does this by creating a third parameter for `groups_remove_member()` --

 If passed, it adds a hook named after `$context` that is fired after a
 group member is removed successfully.  This is to emulate how
 `'groups_leave_group'` hook works at the moment.  As I said, this isn't
 pretty ;)

 Feedback appreciated.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6597#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list