add member role

This commit is contained in:
afornerot 2024-12-29 20:28:42 +01:00
parent 97263e96c3
commit a6ef2a4d7b
3 changed files with 5 additions and 2 deletions

View File

@ -52,6 +52,7 @@ class UserType extends AbstractType
if($options["mode"]!="profil") {
$choices=[];
$choices['Administrateur']='ROLE_ADMIN';
$choices['Membre']='ROLE_MEMBER';
$choices['Utilisateur']='ROLE_USER';
$builder->add('roles',

View File

@ -273,12 +273,14 @@
<div id="membre" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Membres</h1></div>
{% for user in users %}
{% if user.hasRole('ROLE_MEMBER') %}
<div class="grid-item grid-item-size grid-item-size-15 grid-item-size-small-3 grid-item-size-noresize" style="padding:0px 5px;margin-bottom:10px;">
<a class="member" href="{{path("app_home_user",{userpseudo:user.slug})}}">
<img src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" class="mb-2">
<small>{{user.pseudo}}</small>
</a>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}

View File

@ -49,8 +49,8 @@ UTILISATEURS
Administrateur<br>
{%elseif role=="ROLE_MODO" %}
Modérateur<br>
{%elseif role=="ROLE_MASTER" %}
Master<br>
{%elseif role=="ROLE_MEMBER" %}
Membre<br>
{%elseif role=="ROLE_USER" %}
Utilisateur<br>
{%endif%}