WPDev.one
Core Function
View Source on Trac ↗

wp_update_user()

wp_update_user( mixed $userdata )

Updates a user in the database.

Parameters 1 required

Name / Type Description
(array

| object | WP_User) $userdata An array of user data or a user object of type stdClass or WP_User.

Required

Return Value

((int)
| WP_Error) The updated user's ID or a WP_Error object if the user could not be updated.

Function Information

Since Version
2.0.0
Source File
wp-includes/user.php
Advertisement