I have a simple requirement:
1. create a user 2. create a role for the user 3. add capability for the role
First, create a new user
$uid = wp_insert_user($userdata);
Second & Third, create a new role and adding capability on it
add_role( $role, $display_name, $capabilities )
How can I make the relationship between the role and the user ?