[9.2.28] Compatibilité user edit module système avec module auto inscription

This commit is contained in:
Fred Tempez 2020-04-07 17:36:24 +02:00
parent 64104f59f2
commit 8a7377bfba
2 changed files with 17 additions and 15 deletions

View File

@ -33,7 +33,7 @@ class common {
const TEMP_DIR = 'site/tmp/'; const TEMP_DIR = 'site/tmp/';
// Numéro de version // Numéro de version
const ZWII_VERSION = '9.2.27'; const ZWII_VERSION = '9.2.28';
const ZWII_UPDATE_CHANNEL = "v9"; const ZWII_UPDATE_CHANNEL = "v9";
public static $actions = []; public static $actions = [];

View File

@ -301,20 +301,22 @@ class user extends common {
$userIdsFirstnames = helper::arrayCollumn($this->getData(['user']), 'firstname'); $userIdsFirstnames = helper::arrayCollumn($this->getData(['user']), 'firstname');
ksort($userIdsFirstnames); ksort($userIdsFirstnames);
foreach($userIdsFirstnames as $userId => $userFirstname) { foreach($userIdsFirstnames as $userId => $userFirstname) {
self::$users[] = [ if ($this->getData(['user', $userId, 'group'])) {
$userId, self::$users[] = [
$userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']), $userId,
self::$groups[$this->getData(['user', $userId, 'group'])], $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']),
template::button('userEdit' . $userId, [ self::$groups[$this->getData(['user', $userId, 'group'])],
'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/'. $_SESSION['csrf'], template::button('userEdit' . $userId, [
'value' => template::ico('pencil') 'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/'. $_SESSION['csrf'],
]), 'value' => template::ico('pencil')
template::button('userDelete' . $userId, [ ]),
'class' => 'userDelete buttonRed', template::button('userDelete' . $userId, [
'href' => helper::baseUrl() . 'user/delete/' . $userId. '/' . $_SESSION['csrf'], 'class' => 'userDelete buttonRed',
'value' => template::ico('cancel') 'href' => helper::baseUrl() . 'user/delete/' . $userId. '/' . $_SESSION['csrf'],
]) 'value' => template::ico('cancel')
]; ])
];
}
} }
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([