W3cubDocs

/WordPress

add_user()

Creates a new user from the “Users” form using $_POST information.

Return

(int|WP_Error) WP_Error or User ID.

Source

File: wp-admin/includes/user.php

function add_user() {
	return edit_user();
}

Changelog

Version Description
2.0.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/add_user