diff options
| author | Debulois <quentin@debulois.fr> | 2022-04-10 21:25:00 +0200 |
|---|---|---|
| committer | Debulois <quentin@debulois.fr> | 2022-04-10 21:25:00 +0200 |
| commit | 2923e6fca634231533cca11e43a9091344ff4ba5 (patch) | |
| tree | 7181e1b0e26ddb072530adec7d55f77e9e389783 /Core/Functions/func_register.php | |
| parent | 9939f74c0b274ee916f742a45a32d3c843e0960b (diff) | |
Ajout d'un système de notification pour alerter les pro et finition
Diffstat (limited to 'Core/Functions/func_register.php')
| -rw-r--r-- | Core/Functions/func_register.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Core/Functions/func_register.php b/Core/Functions/func_register.php index d8960ce..1a94bc1 100644 --- a/Core/Functions/func_register.php +++ b/Core/Functions/func_register.php @@ -8,14 +8,16 @@ function register($email, $password, $userStatus) { // les regex necessaire pour vérifier le mot de passe - $numb = "/[0-9]/"; - $upper = "/[A-Z]/"; - $special = "/[`!@#$%^&*()_+\-=\[\]{};':\"\\|,.<>\/?~µ°€£]/"; + $regNumb = "/[0-9]/"; + $regUpper = "/[A-Z]/"; + $regSpecial = "/[`!@#$%^&*()_+\-=\[\]{};':\"\\|,.<>\/?~µ°€£]/"; + $regEmail = "/^[a-z0-9_-]+@[a-z0-9-]+\.[a-z]/"; if ((strlen($password) >= 8) - && preg_match($numb, $password) - && preg_match($upper, $password) - && preg_match($special, $password) + && preg_match($regNumb, $password) + && preg_match($regUpper, $password) + && preg_match($regSpecial, $password) + && preg_match($regEmail, $email) ) { $dbuser = new DbUser; |
