Core Function
View Source on Trac ↗ wp_insert_user()
wp_insert_user( mixed $userdata ) Inserts a user into the database.
Parameters 1 required
| Name / Type | Description |
|---|---|
| mixed | (array | object | WP_User) $userdata { An array, object, or WP_User object of user data arguments. Required |
Return Value
((int)
(int | WP_Error) The newly created user's ID or a WP_Error object if the user could not
be created.
Function Information
Since Version
2.0.0
Source File
wp-includes/user.php
Advertisement