[BUGFIX] Allow multiple usergroups

This commit is contained in:
Alex Kellner 2016-08-03 15:53:03 +02:00
parent e655cb399b
commit 29ffaf7424
2 changed files with 6 additions and 6 deletions

View file

@ -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 [];
}

View file

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