wpmu_create_user()创建一个新用户(多站点)

目录

描述

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').

wpmu_create_user() 描述

用法

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

wpmu_create_user() 用法

参数

$user_name

(string) (必填) The new user's login name.

默认值: None

$password

(string) (必填) The new user's password.

默认值: None

$email

(string) (必填) The new user's email address.

默认值: None

wpmu_create_user() 参数

返回值

(mixed

Returns false on failure, or int $user_id on success

wpmu_create_user() 返回值