wp-includes/user.php:3848Sends a confirmation request email when a change of user email address is attempted.
$user_idintoptional0One hook fires while send_confirmation_on_profile_email() runs, in this order:
Filters the text of the email sent when a change of user email address is attempted.
function send_confirmation_on_profile_email( $user_id = 0 ) { global $errors; // Maintain backward compatibility for those relying on a check based on $_POST['user_id']. if ( ! $user_id && isset( $_POST['user_id'] ) ) { $user_id = absint( $_POST['user_id'] ); } $current_user = wp_get_current_user(); if ( ! is_object( $errors ) ) { $errors = new WP_Error(); } if ( 0 === $current_user->ID || $current_user->ID !== (int) $user_id ) { return false; } if ( $current_user->user_email !== $_POST['email'] ) { if ( ! is_email( $_POST['email'] ) ) { $errors->add( 'user_email', __( '<strong>Error:</strong> The email address is not correct.' ), array( 'form-field' => 'email', ) ); $_POST['email'] = addslashes( $current_user->user_email ); return; } if ( email_exists( $_POST['email'] ) ) { $errors->add( 'user_email', __( '<strong>Error:</strong> The email address is already used.' ), array( 'form-field' => 'email', ) ); delete_user_meta( $current_user->ID, '_new_email' ); $_POST['email'] = addslashes( $current_user->user_email ); return; } $hash = md5( $_POST['email'] . time() . wp_rand() ); $new_user_email = array( 'hash' => $hash, 'newemail' => $_POST['email'], ); update_user_meta( $current_user->ID, '_new_email', $new_user_email ); $sitename = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */ $email_text = __( 'Howdy ###USERNAME###, You recently requested to have the email address on your account changed. If this is correct, please click on the following link to change it:###ADMIN_URL### You can safely ignore and delete this email if you do not want totake this action. This email has been sent to ###EMAIL### Regards,All at ###SITENAME######SITEURL###' ); /** * Filters the text of the email sent when a change of user email address is attempted. * * The following strings have a special meaning and will get replaced dynamically: * * - `###USERNAME###` The current user's username. * - `###ADMIN_URL###` The link to click on to confirm the email change.Introduced in 3.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/user.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.