wp_update_user
wp_update_user ( $userdata )
Parameters:- (array|object|WP_User) userdata An array of user data or a user object of type stdClass or WP_User.
See:Returns:- (int|WP_Error) The updated user's ID or a WP_Error object if the user could not be updated.
Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Updates a user in the database.It is possible to update a user's password by specifying the 'user_pass'
value in the $userdata parameter array.
If current user's password is being updated, then the cookies will be
cleared.