summaryrefslogtreecommitdiff
path: root/Core/Functions/func_register.php
diff options
context:
space:
mode:
Diffstat (limited to 'Core/Functions/func_register.php')
-rw-r--r--Core/Functions/func_register.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/Core/Functions/func_register.php b/Core/Functions/func_register.php
index 4c6b00a..4d11dfa 100644
--- a/Core/Functions/func_register.php
+++ b/Core/Functions/func_register.php
@@ -11,12 +11,15 @@ 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)
+ && (strlen($password) <= 128)
&& preg_match($regNumb, $password)
&& preg_match($regUpper, $password)
&& preg_match($regSpecial, $password)
+ && (strlen($email) > 0)
+ && (strlen($email) <= 128)
&& preg_match($regEmail, $email)
) {
$dbuser = new DbUser;