Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/27/2015 07:09:05 PM (5 years ago)
Author:
dcavins
Message:

Limit scope of group invitation delete functions.

Change behavior of groups_uninvite_user(),
groups_reject_invite() and
groups_delete_membership_request(),
to affect only the membership types referred to
by the function name. Adds tests to support the
new behavior.

See #6209.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-functions.php

    r9654 r9810  
    10881088function groups_uninvite_user( $user_id, $group_id ) {
    10891089
    1090     if ( !BP_Groups_Member::delete( $user_id, $group_id ) )
     1090    if ( ! BP_Groups_Member::delete_invite( $user_id, $group_id ) )
    10911091        return false;
    10921092
     
    11651165 */
    11661166function groups_reject_invite( $user_id, $group_id ) {
    1167     if ( ! BP_Groups_Member::delete( $user_id, $group_id ) )
     1167    if ( ! BP_Groups_Member::delete_invite( $user_id, $group_id ) )
    11681168        return false;
    11691169
     
    15751575        $membership = new BP_Groups_Member( false, false, $membership_id );
    15761576
    1577     if ( !BP_Groups_Member::delete( $membership->user_id, $membership->group_id ) )
     1577    if ( ! BP_Groups_Member::delete_request( $membership->user_id, $membership->group_id ) )
    15781578        return false;
    15791579
Note: See TracChangeset for help on using the changeset viewer.