set_user_groups function for setting which groups a user should have access to
usergroup managing