#109794Typo3 Conditions [x in frontend.user.userGroupIds] fails
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
-
Garvin Hicking changed category 05/08/26, 07:06
-
Georg Ringer commented and changed status
NewNeeds Feedback 05/09/26, 12:00 -
Christoph Runkel commented 05/11/26, 07:51
Tested it in 12/13/14 in new Environments. Works fine. Issue can be closed, sorry.
-
Garvin Hicking changed status
Needs FeedbackClosed 05/12/26, 04:48
can you test that in v14 or v13?
in v14 this works fine, having
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