This repository has been archived on 2021-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
feiplogin/Classes/Slot/AddCustomGroupsSlot.php

24 lines
647 B
PHP
Raw Normal View History

<?php
namespace In2code\In2frontendauthentication\Slot;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use In2code\In2frontendauthentication\Domain\Repository\FeGroupsRepository;
class AddCustomGroupsSlot
{
public function addCustomGroups($customGroups)
{
$feGroupsRepository = GeneralUtility::makeInstance(ObjectManager::class)
->get(FeGroupsRepository::class);
$feGroups = $feGroupsRepository->findByCurrentIpAddress();
foreach ($feGroups as $feGroup) {
$customGroups[] = $feGroup['uid'];
}
return array($customGroups);
}
}