Skip to content
Twig Field Finder
Theme

User — email

Open in builder

This is a property of the entity itself, so there’s no field name to fill in.

Reads the entity directly, before field formatters run.

  1. Snippet 1
    {{ user.mail.value }}
  2. Snippet 2
    {{ node.getOwner().getEmail() }}

Gotcha

The first is for user.html.twig, the second for a node’s author. Printing email addresses exposes them to visitors and scrapers.