change default user role wordpres wp config code example
Example: update user role wordpress
$wp_user_object = new WP_User($current_user->ID);
$wp_user_object->set_role('editor');
$wp_user_object = new WP_User($current_user->ID);
$wp_user_object->set_role('editor');