I am having trouble referencing a user in an if statement:
{% set otherEntry = craft.entries().section('other').userFieldInOtherEntry("{externalVariable}").one() %}
{% if currentUser is relatedTo(otherEntry) %}
do something
{% endif %}
I've tried using the for loop method described in the Craft 3 documentation, but I get a recursive loop error.