Function: edit_user

edit_user( integer $user_id )

Edit user settings based on contents of $_POST

Used on user-edit.php and profile.php to manage and process user options, passwords etc.

Parameters

Name Type(s) Default Value Description
$user_id integer

Optional. User ID.

Returns

integer | WP_Error

user id of the updated user

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.