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
Marcus Schwemer b3edef4a59 [TASK] Return the new group(s) explicitly
The signal in fal_secureddownload changed slightly. It requires now,
that the new groups are returned by value, instead of modifing the
object directly.
2017-07-17 10:55:16 +02:00

23 lines
647 B
PHP

<?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);
}
}