I am working on an add-on that adds / removes users from secondary groups.
Adding a user works fine, but I have some problems with removing them from a group.
So for adding a user, I use this existing service:
$userGroup=5;
/** @var UserGroupChange $userGroupChange */
$userGroupChange =...