You are here

function Username_Constraint::validate in Password Policy 5

Overrides Constraint::validate

File

constraints/constraint_username.php, line 12

Class

Username_Constraint

Code

function validate($plaintext_password, $user = NULL) {
  return drupal_strtolower($user->name) != drupal_strtolower($plaintext_password);
}