wp_create_user
wp_create_user ( $username, $password, $email = '' )
Parameters:- (string) username The user's username.
- (string) password The user's password.
- (string) email Optional. The user's email. Default empty.
See:Returns:- (int|WP_Error) The newly created user's ID or a WP_Error object if the user could not be created.
Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Description
Provides a simpler way of inserting a user into the database.Creates a new user with just the username, password, and email. For more
complex user creation use wp_insert_user() to specify more information.