Browse Source

minimum password length

tags/0.1.0
Robin Thoni 8 years ago
parent
commit
846da975c1
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/Auth/Business/LuticateUsersBusiness.php

+ 3
- 0
src/Auth/Business/LuticateUsersBusiness.php View File

132
 
132
 
133
     public static function add($username, $email, $firstname, $lastname, $password)
133
     public static function add($username, $email, $firstname, $lastname, $password)
134
     {
134
     {
135
+        if (strlen($password) < 5) {
136
+            self::badInput("Password must have at least 5 characters");
137
+        }
135
         $hash = self::hashPassword($password);
138
         $hash = self::hashPassword($password);
136
         if (filter_var($username, FILTER_VALIDATE_EMAIL))
139
         if (filter_var($username, FILTER_VALIDATE_EMAIL))
137
             self::badInput("Username can not be an email");
140
             self::badInput("Username can not be an email");

Loading…
Cancel
Save