[buddypress-trac] [BuddyPress Trac] #6209: Add tests for group invitations and membership request functions

buddypress-trac noreply at wordpress.org
Mon Mar 16 02:40:31 UTC 2015


#6209: Add tests for group invitations and membership request functions
--------------------------------+-----------------------
 Reporter:  dcavins             |       Owner:  dcavins
     Type:  task                |      Status:  assigned
 Priority:  normal              |   Milestone:  2.3
Component:  Component - Groups  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |
--------------------------------+-----------------------

Comment (by dcavins):

 Thanks again for the advice, Boone. I've slightly corrected the working
 tests patch per our conversation about writing tests. The new version is
 6209-working-tests.04.patch.

 I've also checked the WordPress plugin repo, and the functions that I'd
 like to modify are used as follows:

 **`groups_uninvite_user()`

 BP Group Control uses `groups_uninvite_user()` to delete members from
 groups
 Last Updated: 5 years ago, Compatible up to: BP 1.2.4.1, WP 2.9
 /bp-group-control/bpgc-classes.php:92
 /bp-group-control/bpgc-core.php:239

 BuddyPress uses `groups_uninvite_user()` to remove invites, and in one
 place even specifically checks for existing requests before using the
 function:
 /buddypress/bp-templates/bp-legacy/buddypress-functions.php:1188

 Buddypress Backwards Compatibility uses `groups_uninvite_user()` to remove
 invites
 /buddypress-backwards-compatibility/bp-themes/bp-sn-
 parent/_inc/ajax.php:99

 CommentPress uses `groups_uninvite_user()` to remove invites
 /commentpress-core/commentpress-core/assets/includes/bp-
 compat/ajax.php:669

 Genesis Connect for BuddyPress uses `groups_uninvite_user()` to remove
 invites
 /genesis-connect-for-buddypress/lib/ajax.php:458

 Invite Anyone  uses `groups_uninvite_user()` to remove invites
 /invite-anyone/group-invites/group-invites.php:407


 **`groups_reject_invite()`

 Only used by BuddyPress to delete invites
 /buddypress/bp-groups/bp-groups-functions.php:1012
 /buddypress/bp-groups/bp-groups-screens.php:79


 **`groups_remove_member()`

 BP Groups Civi crm Sync would like to use `groups_remove_member()` but
 have trouble with the `is_item_admin` check
 /bp-groups-civicrm-sync/bp-groups-civicrm-sync-bp.php:480:
 "We cannot use 'groups_remove_member()' because the logged in user may not
 pass the 'bp_is_item_admin()' check in that function."


 ** `groups_delete_membership_request()`

 BP Group Management uses as expected.
 /bp-group-management/bp-group-management-aux.php:87

 BuddyForms Attach Posts to Groups Extension uses as expected.
 /buddyforms-attach-posts-to-groups-extension/includes/group-
 control.php:128

 Sort of surprisingly, it looks like the functions are being used to do
 what their names would suggest. I don't think we'd break anything other
 than the really out-of-date BP Group Control. There's no way to know how
 many custom plugins we'd break, though. Given what I found, do you think
 it's worth changing the behavior of the various function or would you
 prefer I don't pursue that?

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


More information about the buddypress-trac mailing list