From c1de147bcaaea615e19114a9953fff192ebb1747 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sun, 19 May 2019 21:21:36 +0200 Subject: [PATCH] =?UTF-8?q?[9.1.06]=20nouvel=20utilisateur=20:=20mail=20en?= =?UTF-8?q?voy=C3=A9=20avec=20erreur=20mot=20de=20passe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 5 +++++ core/module/install/install.php | 7 +++++++ core/module/user/user.php | 6 ++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3c586e2a..846768a9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # Changelog +## Version 9.1.06 +- Corrections : + - Ajout d'un utilisateur : pas d'envoi du mail de confirmation si les mots de passe ne sont pas identiques. + - Mise à jour automatique : effacement des archives téléchargées + ## Version 9.1.05 - Correction : - Site par défaut lien Zwii masqué du menu horizontal diff --git a/core/module/install/install.php b/core/module/install/install.php index b2cd433a..c4933652 100755 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -169,6 +169,13 @@ class install extends common { } catch (Exception $e) { $success = $e->getMessage(); } + // Netooyage du dossier + if(file_exists('site/tmp/update.tar.gz')) { + unlink('site/tmp/update.tar.gz'); + } + if(file_exists('site/tmp/update.tar')) { + unlink('site/tmp/update.tar'); + } // Valeurs en sortie $this->addOutput([ 'display' => self::DISPLAY_JSON, diff --git a/core/module/user/user.php b/core/module/user/user.php index f566ce29..7c5af233 100755 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -38,8 +38,10 @@ class user extends common { self::$inputNotices['userAddId'] = 'Identifiant déjà utilisé'; } // Double vérification pour le mot de passe + $mail = true; if($this->getInput('userAddPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('userAddConfirmPassword', helper::FILTER_STRING_SHORT, true)) { self::$inputNotices['userAddConfirmPassword'] = 'Incorrect'; + $mail = false; } // Crée l'utilisateur $userFirstname = $this->getInput('userAddFirstname', helper::FILTER_STRING_SHORT, true); @@ -73,8 +75,8 @@ class user extends common { // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl() . 'user', - 'notification' => ($sent === true ? 'Utilisateur créé' : $sent), - 'state' => ($sent === true ? true : null) + 'notification' => (($sent === true) && ($mail === true) ? 'Utilisateur créé' : $sent), + 'state' => (($sent === true) && ($mail === true) ? true : null) ]); } // Valeurs en sortie