Skip to content

Commit

Permalink
FIX #12041
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 7, 2019
1 parent 23de869 commit 7015e71
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -206,16 +206,20 @@ public function validatePassword($password)
}

/**
* consecutive iterations of the same character
* Consecutive iterations of the same character
*
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
public function consecutiveInterationSameCharacter($password)
{
$last = "";

if (empty($this->NbRepeat)) return 1;

$count = 0;
$char = str_split($password);

foreach($char as $c) {
if($c != $last) {
$last = $c;
Expand Down

0 comments on commit 7015e71

Please sign in to comment.