mirror of
https://github.com/LDAPAccountManager/lam.git
synced 2025-10-03 09:49:16 +02:00
refactoring
This commit is contained in:
parent
e7400e4f6d
commit
c959f4e022
1 changed files with 4 additions and 4 deletions
|
@ -467,16 +467,16 @@ function getNumberOfCharacterClasses($password): int {
|
|||
return 0;
|
||||
}
|
||||
$classesCount = 0;
|
||||
if (preg_match("/[a-z]/", $password)) {
|
||||
if (preg_match('/[a-z]/', $password)) {
|
||||
$classesCount++;
|
||||
}
|
||||
if (preg_match("/[A-Z]/", $password)) {
|
||||
if (preg_match('/[A-Z]/', $password)) {
|
||||
$classesCount++;
|
||||
}
|
||||
if (preg_match("/[0-9]/", $password)) {
|
||||
if (preg_match('/[0-9]/', $password)) {
|
||||
$classesCount++;
|
||||
}
|
||||
if (preg_match("/[^a-z0-9]/i", $password)) {
|
||||
if (preg_match('/[^a-z0-9]/i', $password)) {
|
||||
$classesCount++;
|
||||
}
|
||||
return $classesCount;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue