Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wp_create_user

function wp_create_user( $username, $password, $email = '' ) {
    $user_login = wp_slash( $username );
    $user_email = wp_slash( $email );
    $user_pass  = $password;
 
    $userdata = compact( 'user_login', 'user_email', 'user_pass' );
    return wp_insert_user( $userdata );
}
Comment

wp user create

# Create user
wp user create bob bob@example.com --role=author
Comment

PREVIOUS NEXT
Code Example
Php :: drop all tables laravel 
Php :: Associative array in php 
Php :: laravel validation unique two columns 
Php :: join multiple tables in laravel eloquent 
Php :: wp get tagline 
Php :: PHP Forms - Required Fields 
Php :: php string slice 
Php :: maintaining serial number in laravel pagination table 
Php :: onclick call route laravel 
Php :: trim array in map php 
Php :: laravel create db 
Php :: sha256 encryption in php 
Php :: delete route method in laravel 
Php :: php best debugging functions 
Php :: laravel mass update 
Php :: php email attachment and message 
Php :: how to get just the first row from a table in laravel 
Php :: how to assign value of a js variable to a php variable 
Php :: hello world in php 
Php :: Class "AppHttpControllersAdminController" not found in laravel 8 
Php :: avg rating get in join in laravel 8 
Php :: php regex match numbers only 
Php :: php compute price less discount 
Php :: laravel validate datetime with datetime-local 
Php :: multiple routes same controller laravel 
Php :: laravel factory get foreign key 
Php :: create request laravel command 
Php :: eloquent all only one culomn 
Php :: Display the image on the front end from category taxonomy 
Php :: date in php 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =