Skip to:
Content

BuddyPress.org

Changeset 11358


Ignore:
Timestamp:
12/29/2016 08:35:52 PM (10 years ago)
Author:
boonebgorges
Message:

Pass inviter ID to the groups_accept_invite action.

Props jdgrimes.
Fixes #7410.

File:
1 edited

Legend:

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

    r11286 r11358  
    14261426
    14271427        $member = new BP_Groups_Member( $user_id, $group_id );
     1428
     1429        // Save the inviter ID so that we can pass it to the action below.
     1430        $inviter_id = $member->inviter_id;
     1431
    14281432        $member->accept_invite();
    14291433
    … …  
    14441448         *
    14451449         * @since 1.0.0
    1446          *
    1447          * @param int $user_id  ID of the user who accepted the group invite.
    1448          * @param int $group_id ID of the group being accepted to.
    1449          */
    1450         do_action( 'groups_accept_invite', $user_id, $group_id );
     1450         * @since 2.8.0 The $inviter_id arg was added.
     1451         *
     1452         * @param int $user_id    ID of the user who accepted the group invite.
     1453         * @param int $group_id   ID of the group being accepted to.
     1454         * @param int $inviter_id ID of the user who invited this user to the group.
     1455         */
     1456        do_action( 'groups_accept_invite', $user_id, $group_id, $inviter_id );
    14511457
    14521458        return true;
Note: See TracChangeset for help on using the changeset viewer.