[wp-trac] [WordPress Trac] #43029: Filter "send_email_change_email" is never called
WordPress Trac
noreply at wordpress.org
Fri Jan 5 22:38:31 UTC 2018
#43029: Filter "send_email_change_email" is never called
--------------------------+-----------------------------
Reporter: flymike | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 4.9.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The purpose of the "send_email_change_email" filter is to allow the
optional suppression of the warning email sent when a user changes their
email address.
However, that warning email is sent by function
send_confirmation_on_profile_email() at user.php line 2623 - which gets
called ''before'' the apply_filters for send_email_change_email is called
by function wp_user_update() in user.php at line 1856.
So, by the time that (any) send_email_change_email filter could be called,
the warning email has already been sent.
Further, function send_confirmation_on_profile_email() resets
$_POST['email'] to the ''original'' email address, so function
wp_user_update() is not even aware that the email address has been
changed, and never calls the apply_filters for "send_email_change_email".
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43029>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list