What conditional statement would hide a form if a user is logged in?
1 Answer
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 %}