Answers for "set user by $new_user_id wp"

PHP
0

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 );
}
Posted by: Guest on September-01-2021

Browse Popular Code Answers by Language