3

I use Zoo Visitors and the Zoo channel has a Playa field which relates to a Customers channel. A logged in user may only see entries he has been assigned to. The conditional to check if the customer entry to list has a parent to the logged in user fails.

{exp:channel:entries channel="customers" disable="categories|category_fields|pagination" dynamic="yes"}
{exp:playa:parents channel="zoo_visitor" status="not closed" disable="categories|category_fields|pagination"}
    {if "{username}" == "{logged_in_username"}"}There's a match{/if}
{/exp:playa:parents}
{/exp:channel:entries}

The error message says:

Parse error: syntax error, unexpected '}' in /serverpath/public_html/system/expressionengine/libraries/Functions.php(683) : eval()'d code on line 12

When I replace {logged_in_username} with a sample username like testperson@mydomain.com then the conditional does not break, it does find the match.

The conditional once worked. There where some software updates like EE to 2.5.5, Zoo Visitor to 1.3.21, Playa to 4.3.3 but reverting back to older versions did not help to solve

I need to find out if the logged in user is a parent in the Playa loop. How would I do this?

1

Not sure if it's a typo or not, but you've got an extra " in "{logged_in_username"}".

1
  • Sorry it's a typo. I don't have that extra " in my code. Jan 3 '13 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.