clean_user_cache action-hookWP 4.4.0

Fires immediately after the given user's cache is cleaned.

Usage

add_action( 'clean_user_cache', 'wp_kama_clean_user_cache_action', 10, 2 );

/**
 * Function for `clean_user_cache` action-hook.
 * 
 * @param int     $user_id User ID.
 * @param WP_User $user    User object.
 *
 * @return void
 */
function wp_kama_clean_user_cache_action( $user_id, $user ){

	// action...
}
$user_id(int)
User ID.
$user(WP_User)
User object.

Changelog

Since 4.4.0 Introduced.

Where the hook is called

clean_user_cache()
clean_user_cache
wp-includes/user.php 1921
do_action( 'clean_user_cache', $user->ID, $user );

Where the hook is used in WordPress

Usage not found.