Title: refresh_user_details
Published: April 25, 2014
Last modified: May 20, 2026

---

# refresh_user_details( int $id ): int|false

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#wp--skip-link--target)

Cleans the user cache for a specific user.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#parameters)󠁿

 `$id`intrequired

The user ID.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#return)󠁿

 int|false The ID of the refreshed user or false if the user does not exist.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#source)󠁿

    ```php
    function refresh_user_details( $id ) {
    	$id = (int) $id;

    	$user = get_userdata( $id );
    	if ( ! $user ) {
    		return false;
    	}

    	clean_user_cache( $user );

    	return $id;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/ms.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/ms.php#L330)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/ms.php#L330-L341)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#related)󠁿

| Uses | Description | 
| [clean_user_cache()](https://developer.wordpress.org/reference/functions/clean_user_cache/)`wp-includes/user.php` |

Cleans all user caches.

  | 
| [get_userdata()](https://developer.wordpress.org/reference/functions/get_userdata/)`wp-includes/pluggable.php` |

Retrieves user info by user ID.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/refresh_user_details/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Frefresh_user_details%2F)
before being able to contribute a note or feedback.