2

What conditional statement would hide a form if a user is logged in?

4

The Twig variable currentUser contains information about the currently logged in user, and will be null if no user is currently logged in.

{% if not currentUser %}

    <!-- Your login form -->

{% endif %}
0

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.