add_user
Creates a new user from the "Users" form using $_POST information.
Description
(int|WP_Error) add_user();
Returns (int|WP_Error)
WP_Error or User ID.
Usage
if ( !function_exists( 'add_user' ) ) { require_once ABSPATH . '/wp-admin/includes/user.php'; } // NOTICE! Understand what this does before running. $result = add_user();
Defined (1)
The function is defined in the following location(s).
- /wp-admin/includes/user.php
- function add_user() {
- return edit_user();
- }