bp_core_signup_send_activation_key

Filters if BuddyPress should send an activation key for a new signup.

Description

apply_filters( 'bp_core_signup_send_activation_key', (bool) $true, (int) $user_id, (string) $user_email, (string) $activation_key, (array) $usermeta ); 

Parameters (5)

0. $true (bool) => true
Whether or not to send the activation key.
1. $user_id (int)
User ID to send activation key to.
2. $user_email (string)
User email to send activation key to.
3. $activation_key (string)
Activation key to be sent.
4. $usermeta (array)
Miscellaneous metadata about the user (blog-specific signup data, xprofile data, etc).

Usage

To run the hook, copy the example below.
  1. $true = apply_filters( 'bp_core_signup_send_activation_key', $true, $user_id, $user_email, $activation_key, $usermeta ); 
  2.  
  3. if ( !empty( $true ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_core_signup_send_activation_key callback 
  2. function filter_bp_core_signup_send_activation_key( $true, $user_id, $user_email, $activation_key, $usermeta ) { 
  3. // make filter magic happen here... 
  4. return $true
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_core_signup_send_activation_key', 'filter_bp_core_signup_send_activation_key', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_core_signup_send_activation_key', 'filter_bp_core_signup_send_activation_key', 10, 5 ); 

Defined (1)

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

/bp-members/bp-members-functions.php  
  1. if ( apply_filters( 'bp_core_signup_send_activation_key', true, $user_id, $user_email, $activation_key, $usermeta ) ) {