From f651df2d4b763aadd89ec1aa8a23603ae0ca5e55 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Tue, 9 Jan 2018 12:16:40 +0100 Subject: [PATCH] prevent inactive user from login #57 (#61) --- app/Resources/views/admin/user.html.twig | 2 +- app/Resources/views/user/profile.html.twig | 10 +- .../DataFixtures/ORM/LoadFixtures.php | 94 ++++++++++++------- src/AppBundle/Entity/User.php | 46 ++++++++- 4 files changed, 111 insertions(+), 41 deletions(-) diff --git a/app/Resources/views/admin/user.html.twig b/app/Resources/views/admin/user.html.twig index 468ca3ac..1e6b093f 100644 --- a/app/Resources/views/admin/user.html.twig +++ b/app/Resources/views/admin/user.html.twig @@ -22,7 +22,7 @@ {% for entry in entries %} {{ entry.id }} - {{ entry.alias|default(entry.username) }} + {{ widgets.username(entry) }} {{ entry.username }} {{ entry.email }} {{ entry.title }} diff --git a/app/Resources/views/user/profile.html.twig b/app/Resources/views/user/profile.html.twig index cf29b1a8..ab6254bd 100644 --- a/app/Resources/views/user/profile.html.twig +++ b/app/Resources/views/user/profile.html.twig @@ -149,11 +149,12 @@ {% macro profile_box(user, stats) %} {% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %} + {% import "macros/widgets.html.twig" as widgets %}
{{ macro.avatar(user.avatar, user.username, 'profile-user-img img-responsive img-circle') }} -

{{ user.alias|default(user.username) }}

+

{{ widgets.username(user) }}

{{ user.title }}

@@ -186,6 +187,8 @@ {# -------------------------------- UNUSED FOR NOW -------------------------------- #} {% macro profile_list_unused(user, items, color) %} {% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %} + {% import "macros/widgets.html.twig" as widgets %} +
@@ -193,7 +196,7 @@ {{ macro.avatar(user.avatar, user.username) }}
-

{{ user.alias|default(user.username) }}

+

{{ widgets.username(user) }}

{{ user.title }}