[BUGFIX] Allow multiple usergroups
This commit is contained in:
parent
e655cb399b
commit
29ffaf7424
2 changed files with 6 additions and 6 deletions
|
@ -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 [];
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Reference in a new issue