groups_membership_rejected

Fires after a group membership request has been rejected.

Description

do_action( 'groups_membership_rejected', (int) $membership_user_id, (int) $membership_group_id, (bool) $false ); 

Parameters (3)

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

Usage

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

Defined (1)

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

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