From 8a7377bfba150489a59ae39a2d8dc3e26ac57470 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 7 Apr 2020 17:36:24 +0200 Subject: [PATCH] =?UTF-8?q?[9.2.28]=20Compatibilit=C3=A9=20user=20edit=20m?= =?UTF-8?q?odule=20syst=C3=A8me=20avec=20module=20auto=20inscription?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 2 +- core/module/user/user.php | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/core/core.php b/core/core.php index 89d5300a..d82bf4f0 100644 --- a/core/core.php +++ b/core/core.php @@ -33,7 +33,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '9.2.27'; + const ZWII_VERSION = '9.2.28'; const ZWII_UPDATE_CHANNEL = "v9"; public static $actions = []; diff --git a/core/module/user/user.php b/core/module/user/user.php index 938f6c6f..1de22571 100755 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -301,20 +301,22 @@ class user extends common { $userIdsFirstnames = helper::arrayCollumn($this->getData(['user']), 'firstname'); ksort($userIdsFirstnames); foreach($userIdsFirstnames as $userId => $userFirstname) { - self::$users[] = [ - $userId, - $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']), - self::$groups[$this->getData(['user', $userId, 'group'])], - template::button('userEdit' . $userId, [ - 'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/'. $_SESSION['csrf'], - 'value' => template::ico('pencil') - ]), - template::button('userDelete' . $userId, [ - 'class' => 'userDelete buttonRed', - 'href' => helper::baseUrl() . 'user/delete/' . $userId. '/' . $_SESSION['csrf'], - 'value' => template::ico('cancel') - ]) - ]; + if ($this->getData(['user', $userId, 'group'])) { + self::$users[] = [ + $userId, + $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']), + self::$groups[$this->getData(['user', $userId, 'group'])], + template::button('userEdit' . $userId, [ + 'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/'. $_SESSION['csrf'], + 'value' => template::ico('pencil') + ]), + template::button('userDelete' . $userId, [ + 'class' => 'userDelete buttonRed', + 'href' => helper::baseUrl() . 'user/delete/' . $userId. '/' . $_SESSION['csrf'], + 'value' => template::ico('cancel') + ]) + ]; + } } // Valeurs en sortie $this->addOutput([