Issue Bug Closed

#109794Typo3 Conditions [x in frontend.user.userGroupIds] fails

Christoph Runkel 05/07/26, 12:43 updated 05/12/26, 04:48

Description

The following condition is executed if usergroup2 exists, and a frontend user is logged in, that is assigned to another group but not group id 2.

[2 in frontend.user.userGroupIds]
page.998 = TEXT
page.998.value = GROUP 2 FOUND
[end]

Executes the embedded code even if the frontend user is not assigned to this usergroup. Usergroup 2 only has to exist.

To reproduce this error try the following:
Add the code in your root TypoScript.
Create a fe_user, two fe_usergroups, and assign the user to the group with ID 1.
Login to the website – the above mentioned Text GROUP 2 FOUND should appear although the user is not assigned to group 2

As far as i could reconstruct that the error is located here:

typo3/sysext/frontend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php Line 92ff

$frontendUserAspect->get('groupIds') get all available fe_groups not only the ones the user is assigned to.
$frontend->user->userGroupList = implode(',', $frontendUserAspect->get('groupIds'));
$frontend->user->userGroupIds = $frontendUserAspect->get('groupIds');
//OLD SYNTAX FIXES THE PROBLEM
$frontend->user->userGroupIds = array($GLOBALS['TSFE']->fe_user->user['usergroup']);
$frontend->user->userGroupList = implode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']);

I took a look in Typo3 13 and the similar backend conditions and found similar code, not checked.

Can someone else confirm this behaviour?

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 4

  1. Georg Ringer commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2026-05-09T12:00:29+00:00" > 05/09/26, 12:00 </span>

    can you test that in v14 or v13?

    in v14 this works fine, having

    page.998 = TEXT
    page.998.value = NOT GROUP 2 FOUND
    
    [2 in frontend.user.userGroupIds]
    page.998 = TEXT
    page.998.value = GROUP 2 FOUND
    [end]

    if the fe_user got a group with ID 2 assigned, the correct value is shown, otherwise the “not” label.

    also check if not some simulate group feature of ext:adminpanel is enabled

  2. Christoph Runkel commented <span data-processor="relativetime" data-value="2026-05-11T07:51:58+00:00" > 05/11/26, 07:51 </span>

    Tested it in 12/13/14 in new Environments. Works fine. Issue can be closed, sorry.