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

buddypress-trac noreply at wordpress.org
Sun Oct 11 16:05:38 UTC 2015

#6597: Targeting the 'groups_leave_group' action can be difficult
 Reporter:  thebrandonallen           |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  2.4
Component:  Component - Groups        |     Version:  2.3.0
 Severity:  normal                    |  Resolution:
 Keywords:  dev-feedback needs-patch  |

Comment (by dcavins):

 Some thoughts:

 * Reverting r9811 as the complete solution wouldn't fix @thebrandonallen's
 original problem: separating the hooks. Using `groups_uninvite_user()`
 within `groups_leave_group()` calls two hooks: `groups_uninvite_user` as
 well as `groups_leave_group`.
 * Using `groups_remove_member()` within `groups_leave_group()` was
 probably one of my many bad ideas.
 * I'm feeling like `remove` is applied to a user by an admin while `leave`
 is a user-initiated action.
 * In `BP_Groups_Member` there's a `delete()` that looks like an all-
 purpose, no-intent-implied function.

 My preference is to basically revert r9811 (undoing the changes to
 `groups_remove_member()`) and use `BP_Groups_Member::delete()` within
 `groups_leave_group()`. See 6597.03.patch.

 @r-a-y what do you think?

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

More information about the buddypress-trac mailing list