groups_membership_accepted

Fires after a group membership request has been accepted.

Description

do_action( 'groups_membership_accepted', (int) $membership_user_id, (int) $membership_group_id, (bool) $true ); 

Parameters (3)

0. $membership_user_id (int)
ID of the user who accepted membership.
1. $membership_group_id (int)
ID of the group that was accepted membership to.
2. $true (bool) => true
If membership was accepted.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'groups_membership_accepted', $membership_user_id, $membership_group_id, $true ); 
The following example is for adding a hook callback.
  1. // define the groups_membership_accepted callback 
  2. function action_groups_membership_accepted( $membership_user_id, $membership_group_id, $true ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'groups_membership_accepted', 'action_groups_membership_accepted', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'groups_membership_accepted', 'action_groups_membership_accepted', 10, 3 ); 

Defined (1)

The action is defined in the following location(s).

/bp-groups/bp-groups-functions.php  
  1. do_action( 'groups_membership_accepted', $membership->user_id, $membership->group_id, true );