Core Function
View Source on Trac ↗ wp_create_user()
wp_create_user( mixed $username, mixed $password, mixed $email = '' ) Provides a simpler way of inserting a user into the database.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $username string | The user's username. Required |
| $password string | The user's password. Required |
| $email string | Optional. The user's email. Default empty. |
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