refresh_user_details() WordPress Function

The refresh_user_details() function is used to update the user details for a given user. This function is typically used when the user details have been changed in the database.

refresh_user_details( int $id ) #

Cleans the user cache for a specific user.


Parameters

$id

(int)(Required)The user ID.


Top ↑

Return

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


Top ↑

Source

File: wp-admin/includes/ms.php

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

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

	clean_user_cache( $user );

	return $id;
}


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.