Skip to:
Content

BuddyPress.org

Ticket #6090: 6090.01.patch

File 6090.01.patch, 1.3 KB (added by dcavins, 9 years ago)

Fix parameter order in uses of groups_delete_membership_request()

  • src/bp-groups/bp-groups-functions.php

    diff --git src/bp-groups/bp-groups-functions.php src/bp-groups/bp-groups-functions.php
    index ec3ec01..bf321c4 100644
    function groups_join_group( $group_id, $user_id = 0 ) { 
    409409
    410410        // Check if the user has an outstanding request. If so, delete it.
    411411        if ( groups_check_for_membership_request( $user_id, $group_id ) )
    412                 groups_delete_membership_request( $user_id, $group_id );
     412                groups_delete_membership_request( null, $user_id, $group_id );
    413413
    414414        // User is already a member, just return true
    415415        if ( groups_is_user_member( $user_id, $group_id ) )
    function groups_accept_invite( $user_id, $group_id ) { 
    976976                }
    977977
    978978                if ( groups_check_for_membership_request( $user_id, $group_id ) ) {
    979                         groups_delete_membership_request( $user_id, $group_id );
     979                        groups_delete_membership_request( null, $user_id, $group_id );
    980980                }
    981981
    982982                return true;
    function groups_delete_membership_request( $membership_id, $user_id = 0, $group_ 
    13281328        else
    13291329                $membership = new BP_Groups_Member( false, false, $membership_id );
    13301330
    1331         if ( !BP_Groups_Member::delete( $membership->user_id, $membership->group_id ) )
     1331        if ( !BP_Groups_Member::delete_request( $membership->user_id, $membership->group_id ) )
    13321332                return false;
    13331333
    13341334        return $membership;