You are here

public function PasswordPolicyConstraint::check in Password Policy 7.2

Checks whether constraint is met.

Parameters

string $password: Password.

object $account: User object.

Return value

bool TRUE if the constraint is met, FALSE otherwise.

File

includes/PasswordPolicyConstraint.inc, line 80
Contains PasswordPolicyConstraint.

Class

PasswordPolicyConstraint
Class PasswordPolicyConstraint.

Code

public function check($password, $account) {
  $func = $this
    ->func('constraint callback');
  if ($func) {
    return $func($password, $account, $this);
  }
  return TRUE;
}