public function Matcher::getMatches in Password Strength 8.2
Get matches for a password.
array(
'Alice Smith',
);
Parameters
string $password: Password string to match.
array $userInputs: Array of values related to the user (optional).
Return value
array Array of Match objects.
File
- src/
Matcher.php, line 20
Class
Namespace
Drupal\password_strengthCode
public function getMatches($password, array $userInputs = array()) {
$matches = array();
foreach ($this
->getMatchers() as $matcher) {
$matched = $matcher::match($password, $userInputs);
if (is_array($matched) && !empty($matched)) {
$matches = array_merge($matches, $matched);
}
}
return $matches;
}