Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | private static function checkPasswordPolicy($password, $minLength = 8, $regex = '/^.*([0-9]+.*[^0-9a-zA-Z]+|[^0-9a-zA-Z]+.*[0-9]+)+.*$/') |
||
|
|||
26 | { |
||
27 | if (strlen($password) < $minLength) { |
||
28 | return false; |
||
29 | } |
||
30 | if (preg_match($regex, $password) === 0) { |
||
31 | return false; |
||
32 | } |
||
33 | return true; |
||
34 | } |
||
35 | |||
72 |