Change user community role
To change the community role of a specific user, you have to know the user ID first.
global $ultimatemember; // $user_id should be the User ID um_fetch_user( $user_id ); // new_role_slug is the slug of the new role e.g. member $ultimatemember->user->set_role( 'new_role_slug' );