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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36482 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges
2016-02-05 19:02:51 +00:00
parent 2c73fd9531
commit 3ed7c823c9
2 changed files with 18 additions and 0 deletions
+1
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 );