[buddypress-trac] [BuddyPress Trac] #7647: Group membership events need "after" actions

buddypress-trac noreply at wordpress.org
Wed Dec 20 19:43:54 UTC 2017


#7647: Group membership events need "after" actions
--------------------------+----------------------------------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Groups        |    Version:
 Severity:  normal        |   Keywords:  needs-patch good-first-bug
--------------------------+----------------------------------------
 Our hooks 'groups_join_group' and 'groups_leave_group' fire after the
 database update has taken place. The hooks 'groups_promote_member',
 'groups_demote_member', 'groups_ban_member', 'groups_unban_member', and
 'groups_remove_member' fire *before* the database update.

 There are two problems here. One is the inconsistency. We may not be able
 to fix this, for backward compatibility reasons. Two is the fact that it's
 clunky to fire an action *after* a removal/ban/etc. I think we can more
 easily fix this, by the introduction of 'groups_promoted_member', etc
 hooks. This is more or less what WP does in various places.

 Does this sound like a reasonable approach?

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


More information about the buddypress-trac mailing list