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:

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.

Related Functions

wpmu_create_user, create_user, wp_create_term, wp_delete_user, wp_update_user

Top Google Results

User discussions

wpseek mobile