wp_insert_user role not working
$WP_array = array ( ‘user_login’ => $username, ‘user_email’ => $email, ‘user_pass’ => $password, ‘user_url’ => $website, ‘first_name’ => $first_name, ‘last_name’ => $last_name, ‘nickname’ => $nickname, ‘description’ => $bio, ) ; $id = wp_insert_user( $WP_array ) ; wp_update_user( array (‘ID’ => $id, ‘role’ => ‘editor’) ) ; Since you are looking for working solutions, this one … Read more