send_password_change_email

Filters whether to send the password change email.

Description

apply_filters( 'send_password_change_email', (bool) $true, (array) $user, (array) $userdata ); 

Parameters (3)

0. $true (bool) => true
Whether to send the email.
1. $user (array)
The original user array.
2. $userdata (array)
The updated user array.

Usage

To run the hook, copy the example below.
  1. $true = apply_filters( 'send_password_change_email', $true, $user, $userdata ); 
  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 send_password_change_email callback 
  2. function filter_send_password_change_email( $true, $user, $userdata ) { 
  3. // make filter magic happen here... 
  4. return $true
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'send_password_change_email', 'filter_send_password_change_email', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'send_password_change_email', 'filter_send_password_change_email', 10, 3 ); 

Defined (1)

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

/wp-includes/user.php  
  1. $send_password_change_email = apply_filters( 'send_password_change_email', true, $user, $userdata );