When updating a user, invalidate its 'userslugs' cache.

`user_nicename` can be changed via `wp_update_user()`, so we invalidate just
to be safe.

Props thebrandonallen.
Fixes #35750.
Built from https://develop.svn.wordpress.org/trunk@36482


git-svn-id: http://core.svn.wordpress.org/trunk@36449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2016-02-05 19:03:26 +00:00
parent 8db393ada6
commit 20c07afbd5
2 changed files with 2 additions and 1 deletions

View File

@ -1682,6 +1682,7 @@ function wp_update_user($userdata) {
}
wp_cache_delete( $user['user_email'], 'useremail' );
wp_cache_delete( $user['user_nicename'], 'userslugs' );
// Merge old and new fields with new fields overwriting old ones.
$userdata = array_merge( $user, $userdata );

View File

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