Merge branch '10400' into data_engine

This commit is contained in:
Fred Tempez 2020-10-18 17:20:28 +02:00
commit c535d7560a

View File

@ -615,7 +615,7 @@ class user extends common {
// Nettoyage de l'identifiant // Nettoyage de l'identifiant
$userId = helper::filter($item['id'] , helper::FILTER_ID); $userId = helper::filter($item['id'] , helper::FILTER_ID);
// Enregistre le user // Enregistre le user
$this->setData([ $create = $this->setData([
'user', 'user',
$userId, [ $userId, [
'firstname' => $item['prenom'], 'firstname' => $item['prenom'],
@ -633,19 +633,10 @@ class user extends common {
"accessCsrf" => null "accessCsrf" => null
]]); ]]);
// Icône de notification // Icône de notification
$item['notification'] = template::ico('check'); $item['notification'] = $create ? template::ico('check') : template::ico('cancel');
// Création du tableau de confirmation
self::$users[] = [
$userId,
$item['nom'],
$item['prenom'],
self::$groups[$item['groupe']],
$item['prenom'],
$item['email'],
$item['notification']
];
// Envoi du mail // Envoi du mail
if ($this->getInput('userImportNotification',helper::FILTER_BOOLEAN) === true) { if ($create
AND $this->getInput('userImportNotification',helper::FILTER_BOOLEAN) === true) {
$sent = $this->sendMail( $sent = $this->sendMail(
$item['email'], $item['email'],
'Compte créé sur ' . $this->getData(['config', 'title']), 'Compte créé sur ' . $this->getData(['config', 'title']),
@ -659,6 +650,16 @@ class user extends common {
$item['notification'] = template::ico('comment') ; $item['notification'] = template::ico('comment') ;
} }
} }
// Création du tableau de confirmation
self::$users[] = [
$userId,
$item['nom'],
$item['prenom'],
self::$groups[$item['groupe']],
$item['prenom'],
$item['email'],
$item['notification']
];
} }
} }
} }