From 956f0515a728cdd2b409b3a34924bfd3fcd81a32 Mon Sep 17 00:00:00 2001 From: Debulois Date: Tue, 19 Apr 2022 12:27:07 +0200 Subject: Correction oubli RegEx et supprosion d'une méthode non utilisée MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Functions/func_register.php | 2 +- Database/dbmain.php | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Core/Functions/func_register.php b/Core/Functions/func_register.php index 1a94bc1..d0b7ba2 100644 --- a/Core/Functions/func_register.php +++ b/Core/Functions/func_register.php @@ -11,7 +11,7 @@ function register($email, $password, $userStatus) { $regNumb = "/[0-9]/"; $regUpper = "/[A-Z]/"; $regSpecial = "/[`!@#$%^&*()_+\-=\[\]{};':\"\\|,.<>\/?~µ°€£]/"; - $regEmail = "/^[a-z0-9_-]+@[a-z0-9-]+\.[a-z]/"; + $regEmail = "/^[a-z0-9._-]+@[a-z0-9-]+\.[a-z]/"; if ((strlen($password) >= 8) && preg_match($regNumb, $password) diff --git a/Database/dbmain.php b/Database/dbmain.php index 193c93a..4e1f7aa 100644 --- a/Database/dbmain.php +++ b/Database/dbmain.php @@ -215,14 +215,6 @@ class DbMain { return $data[0][0]; } - // Vérifie si l'id est un consultant dans la table userAccount de la BDD - final public function check_exist_pro($id) { - $reqCheckExistConsultant = "SELECT EXISTS(SELECT * FROM ".$this->tableUserAccount." WHERE id = ? AND isPro = '1')"; - $data = $this->exec_cmd($reqCheckExistConsultant, array($id))->fetchAll(PDO::FETCH_NUM); - // Retourne 1 si existe, sinon 0 - return $data[0][0]; - } - // Constructeur, fonction "auto" déclenchée à l'instanciation final public function __construct() { // Essaie de se connecter a la BDD -- cgit v1.2.3