Answers for "wp_insert_user"

PHP
0

wp_insert_user

$website = "http://example.com";
$userdata = array(
    'user_login' =>  'login_name',
    'user_url'   =>  $website,
    'user_pass'  =>  'plain_password' // When creating an user, `user_pass` is expected.
);
 
$user_id = wp_insert_user( $userdata ) ;
 
// On success.
if ( ! is_wp_error( $user_id ) ) {
    echo "User created : ". $user_id;
}
Posted by: Guest on May-08-2020

Code answers related to "wp_insert_user"

Browse Popular Code Answers by Language