20 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper;
80 parent::initializeArguments();
82 $this->registerArgument(
'role',
'string',
'The usergroup (either the usergroup uid or its title).');
93 $role = $arguments[
'role'];
95 $userAspect = GeneralUtility::makeInstance(Context::class)->getAspect(
'frontend.user');
96 if (!$userAspect->isLoggedIn()) {
99 if (is_numeric($role)) {
100 $groupIds = $userAspect->getGroupIds();
101 return in_array((
int)$role, $groupIds,
true);
103 return in_array($role, $userAspect->getGroupNames(),
true);