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:

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.

Related Functions

wp_update_site, wp_update_term, wp_update_user_counts, wp_create_user, wp_delete_user

Top Google Results

User discussions

wpseek mobile