Warning: This function has been deprecated. Use wp_create_user() instead.

create_user() WordPress Function

The create_user() function allows you to create a new user in WordPress. This function takes four arguments: the user's login, the user's email, the user's password, and the user's role. The user's role can be either 'subscriber' or 'administrator'.

create_user( string $username, string $password, string $email ) #

An alias of wp_create_user().


Description

Top ↑

See also


Top ↑

Parameters

$username

(string)(Required)The user's username.

$password

(string)(Required)The user's password.

$email

(string)(Required)The user's email.


Top ↑

Return

(int) The new user's ID.


Top ↑

Source

File: wp-includes/deprecated.php

function create_user($username, $password, $email) {
	_deprecated_function( __FUNCTION__, '2.0.0', 'wp_create_user()' );
	return wp_create_user($username, $password, $email);
}


Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More