mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Users: Use clean_user_cache() in wp_insert_user(), wp_update_user(), wp_set_password(), add_user_to_blog().
Props spacedmonkey. Fixes #47021. git-svn-id: https://develop.svn.wordpress.org/trunk@45715 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -206,9 +206,12 @@ function add_user_to_blog( $blog_id, $user_id, $role ) {
|
||||
* @param int $blog_id Blog ID.
|
||||
*/
|
||||
do_action( 'add_user_to_blog', $user_id, $role, $blog_id );
|
||||
wp_cache_delete( $user_id, 'users' );
|
||||
|
||||
clean_user_cache( $user_id );
|
||||
wp_cache_delete( $blog_id . '_user_count', 'blog-details' );
|
||||
|
||||
restore_current_blog();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user