Ja Nosch
Ja Nosch

Reputation: 423

TYPO3 if.isInList not working as expected

I have a simple cObject override which I would like to work if a user is in a certain group. Looking at the TSRef if.isInList should be right for this task? But it doesn't work. This is my snippet:

if.isInList.data=TSFE:fe_user|user|usergroup
if.insertData = 1
if.value = 2

I tested the override itself with a if.value=1 and if.equals=1 -> works fine. I also checked for the TSFE data by showing it as a string, it has the right usergroup in it and looks like this "3,2" ... also this if works but is not good for me since users can be in many groups and I only want to check for one of them:

if.equals.data=TSFE:fe_user|user|usergroup
if.insertData = 1
if.value = 3,2

I turned it around and used

    if.data=TSFE:fe_user|user|usergroup
    if.insertData = 1
    if.isInList.value = 2 

... but that will always fire reagrdless of the usergroup

Thanks for any insights

Upvotes: 0

Views: 359

Answers (1)

Ja Nosch
Ja Nosch

Reputation: 423

for anyone having the same troubles: the syntax must be like this then it will work:

   if.value.data=TSFE:fe_user|user|usergroup
   if.isInList = 2

Upvotes: 1

Related Questions