When updating a user, only send email-change notification if email address is passed.
The notification, introduced in [32380], was firing incorrectly (and throwing a PHP notice) when `wp_update_user()` was called without including 'user_email' in the update data. Props imath. Fixes #32684. See #32430. git-svn-id: https://develop.svn.wordpress.org/trunk@32838 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cf9044394b
commit
7ae03917a9
@ -2158,7 +2158,7 @@ function wp_update_user($userdata) {
|
|||||||
$send_pass_change_email = apply_filters( 'send_pass_change_email', true, $user, $userdata );
|
$send_pass_change_email = apply_filters( 'send_pass_change_email', true, $user, $userdata );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $user['user_email'] !== $userdata['user_email'] ) {
|
if ( isset( $userdata['user_email'] ) && $user['user_email'] !== $userdata['user_email'] ) {
|
||||||
/**
|
/**
|
||||||
* Filter to stop the sending of the email change email.
|
* Filter to stop the sending of the email change email.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user