Skip to content

Commit

Permalink
fix: Do not format null user.lastLogin date
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Sep 23, 2024
1 parent 4cfe40f commit 37aafec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Rozier/src/Resources/views/users/security.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
{% endif %}
<tr>
<td><strong>{% trans %}user.last-login{% endtrans %}</strong></td>
<td>{{ user.lastLogin|format_datetime('full', 'medium', locale=app.request.locale) }}</td>
<td>{{- user.lastLogin ?
user.lastLogin|format_datetime('full', 'medium', locale=app.request.locale) :
'never'|trans -}}</td>
</tr>
<tr>
<td><strong>{% trans %}user.password-requested-at{% endtrans %}</strong></td>
{% if user.passwordRequestedAt %}
<td>{{ user.passwordRequestedAt|format_datetime('full', 'medium', locale=app.request.locale) }}</td>
{% else %}
<td>{% trans %}never.requested{% endtrans %}</td>
{% endif %}
<td>{{- user.passwordRequestedAt ?
user.passwordRequestedAt|format_datetime('full', 'medium', locale=app.request.locale) :
'never.requested'|trans -}}</td>
</tr>
</table>
</div>
Expand Down

0 comments on commit 37aafec

Please sign in to comment.