send_retrieve_password_email filter-hookWP 6.0.0

Filters whether to send the retrieve password email.

Return false to disable sending the email.

Usage

add_filter( 'send_retrieve_password_email', 'wp_kama_send_retrieve_password_email_filter', 10, 3 );

/**
 * Function for `send_retrieve_password_email` filter-hook.
 * 
 * @param bool    $send       Whether to send the email.
 * @param string  $user_login The username for the user.
 * @param WP_User $user_data  WP_User object.
 *
 * @return bool
 */
function wp_kama_send_retrieve_password_email_filter( $send, $user_login, $user_data ){

	// filter...
	return $send;
}
$send(true|false)
Whether to send the email.
$user_login(string)
The username for the user.
$user_data(WP_User)
WP_User object.

Changelog

Since 6.0.0 Introduced.

Where the hook is called

retrieve_password()
send_retrieve_password_email
wp-includes/user.php 3101
if ( ! apply_filters( 'send_retrieve_password_email', true, $user_login, $user_data ) ) {

Where the hook is used in WordPress

Usage not found.