$arGroups = CUser::GetUserGroupArray($USER->GetID()); $arGroups[] = 10; $USER->SetUserGroupArray($arGroups);