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.
Built from https://develop.svn.wordpress.org/trunk@32838


git-svn-id: http://core.svn.wordpress.org/trunk@32809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2015-06-18 13:30:26 +00:00
parent 6105fca015
commit 2e5e0bdc78
2 changed files with 2 additions and 2 deletions

View File

@ -2158,7 +2158,7 @@ function wp_update_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.
*

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32837';
$wp_version = '4.3-alpha-32838';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.