You are here

public function PasswordPolicy::activeConstraints in Password Policy 7.2

Returns all constraints that are active.

Return value

PasswordPolicyConstraint[] Active constraints.

2 calls to PasswordPolicy::activeConstraints()
PasswordPolicy::check in includes/PasswordPolicy.inc
Checks password versus each of the policy's active constraints.
PasswordPolicy::messages in includes/PasswordPolicy.inc
Collects messages generated from all plugins.

File

includes/PasswordPolicy.inc, line 135
Contains PasswordPolicy.

Class

PasswordPolicy
Defines a class used for managing Password Policies.

Code

public function activeConstraints() {
  $constraints = array();
  foreach ($this
    ->getItems('constraint') as $constraint) {
    if ($constraint
      ->isActive()) {
      $constraints[] = $constraint;
    }
  }
  return $constraints;
}