public function getGroups(
        $user,
        /** @noinspection PhpUnusedParameterInspection */
        $knownGroups
    ) {
        $groupData = [];

            /** @var $requestHandler PageIndexerRequestHandler */
        $requestHandler = GeneralUtility::makeInstance(PageIndexerRequestHandler::class);
        $accessRootline = $requestHandler->getRequest()->getParameter('accessRootline');

        if ($user['username'] == self::SOLR_INDEXER_USERNAME && !empty($accessRootline)) {
            $accessRootline = GeneralUtility::makeInstance(Rootline::class, /** @scrutinizer ignore-type */ $accessRootline);
            $groups = $accessRootline->getGroups();

            foreach ($groups as $groupId) {
                // faking a user group record
                $groupData[] = [
                    'uid' => $groupId,
                    'pid' => 0,
                    'title' => '__SolrIndexerGroup__',
                    'TSconfig' => ''
                ];
            }
        }

        return $groupData;
    }