Trends

add_user || Creates a new user from the "Users" form using $_POST information.

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

  1. if ( !function_exists( 'add_user' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/user.php'; 
  3. } 
  4.  
  5.  
  6. // NOTICE! Understand what this does before running. 
  7. $result = add_user(); 
  8.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/user.php  
  1. function add_user() { 
  2. return edit_user(); 
  3. } 

No comments