WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wpmu create user

Description

Create a user using strict username sanitization: only alphanumeric, _, ., -, and/or @ are allowed.

This function runs when a user self-registers as well as when a Super Admin creates a new user. Hook to 'wpmu_new_user' for events that should affect all new users, but only on Multisite (otherwise use 'user_register').

Usage

<?php wpmu_create_user$user_name$password$email ); ?>

Parameters

$user_name
(string) (required) The new user's login name.
Default: None
$password
(string) (required) The new user's password.
Default: None
$email
(string) (required) The new user's email address.
Default: None

Return Values

(mixed) 
Returns false on failure, or int $user_id on success

Source File

wpmu_create_user() is located in wp-includes/ms-functions.php