Ajoute le nom du profil dans la liste des utilisateurs

This commit is contained in:
Fred Tempez 2023-07-01 19:18:40 +02:00
parent 3af3db940c
commit 2cabb31734
2 changed files with 5 additions and 3 deletions

View File

@ -263,7 +263,6 @@ class user extends common
else {
// Soumission du formulaire
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
// Double vérification pour le mot de passe
@ -442,10 +441,13 @@ class user extends common
ksort($userIdsFirstnames);
foreach ($userIdsFirstnames as $userId => $userFirstname) {
if ($this->getData(['user', $userId, 'group'])) {
$group = helper::translate(self::$groups[(int) $this->getData(['user', $userId, 'group'])]);
$profil = $this->getData(['profil', $this->getData(['user', $userId, 'group']), $this->getData(['user', $userId, 'profil']), 'name']);
self::$users[] = [
$userId,
$userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']),
helper::translate(self::$groups[(int) $this->getData(['user', $userId, 'group'])]),
$group,
empty($profil) ? $group : $profil,
template::button('userEdit' . $userId, [
'href' => helper::baseUrl() . 'user/edit/' . $userId,
'value' => template::ico('pencil'),

View File

@ -38,4 +38,4 @@
]); ?>
</div>
</div>
<?php echo template::table([3, 4, 3, 1, 1], $module::$users, ['Identifiant', 'Nom', 'Groupe', '', '']); ?>
<?php echo template::table([2, 2 , 3, 3, 1, 1], $module::$users, ['Identifiant', 'Nom', 'Groupe', 'Profil', '', '']); ?>