diff --git a/Classes/Domain/Repository/FeGroupsRepository.php b/Classes/Domain/Repository/FeGroupsRepository.php index 46944b2..cd319c8 100644 --- a/Classes/Domain/Repository/FeGroupsRepository.php +++ b/Classes/Domain/Repository/FeGroupsRepository.php @@ -42,13 +42,13 @@ class FeGroupsRepository */ public function findByCurrentIpAddress() { - $row = $this->getDatabaseConnection()->exec_SELECTgetSingleRow( + $rows = $this->getDatabaseConnection()->exec_SELECTgetRows( '*', self::TABLE_NAME, 'deleted = 0 and hidden = 0' . $this->getIpQueryString() ); - if ($row !== false) { - return $row; + if (!empty($rows)) { + return $rows; } return []; } diff --git a/Classes/Domain/Service/AuthenticationService.php b/Classes/Domain/Service/AuthenticationService.php index 1530eca..90b0cff 100644 --- a/Classes/Domain/Service/AuthenticationService.php +++ b/Classes/Domain/Service/AuthenticationService.php @@ -47,9 +47,9 @@ class AuthenticationService extends AuthenticationServiceCore { $feGroupsRepository = GeneralUtility::makeInstance(ObjectManager::class) ->get(FeGroupsRepository::class); - $feGroup = $feGroupsRepository->findByCurrentIpAddress(); - if (!empty($feGroup)) { - return $feGroup; + $feGroups = $feGroupsRepository->findByCurrentIpAddress(); + if (!empty($feGroups)) { + return $feGroups; } return parent::getGroups($user, $knownGroups); }