summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebulois <quentin@debulois.fr>2022-04-19 12:27:07 +0200
committerDebulois <quentin@debulois.fr>2022-04-19 12:27:07 +0200
commit956f0515a728cdd2b409b3a34924bfd3fcd81a32 (patch)
tree7c98b2d5f479ab7466673c7de6caab309c8f8804
parent8dea7146e3860bd5b98d68a610b53cf888ede0e9 (diff)
Correction oubli RegEx et supprosion d'une méthode non utilisée
-rw-r--r--Core/Functions/func_register.php2
-rw-r--r--Database/dbmain.php8
2 files changed, 1 insertions, 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