Skip to content

Custom email template

You can override the default email template:

Default email template

Create the file:

templates/bundles/SpiriitAuthLogBundle/new_device.html.twig

Available variables

VariableTypeDescription
userInformation.ipAddress?stringClient IP address
userInformation.userAgent?stringBrowser / device user agent
userInformation.loginAt?DateTimeImmutableLogin timestamp
userInformation.location?LocateValuesGeolocation (city, country, latitude, longitude)
userReference.displayNamestringUser display name
userReference.emailstringUser email
userReference.userIdentity.userIdentifierstringUser identifier
userReference.userIdentity.userClassstringUser class (FQCN)
authenticationLogAuthenticationLogInterfaceThe persisted log (getUser(), getLoginAt(), userIdentity()…)
confirmationLinks?ConfirmationLinksacknowledgeUrl / disavowUrl — only set when the confirmation feature is enabled
authenticableLogUserReferenceDeprecated alias of userReference, removed in 4.0

Built and maintained by Spiriit — released under the MIT License.