You are here

function password_strength_check_strength in Password Strength 6.2

Same name and namespace in other branches
  1. 7 password_strength.module \password_strength_check_strength()

Determine if strength should be checked.

Parameters

object $account: User account object to optionally include in deciding to check.

Return value

bool

2 calls to password_strength_check_strength()
password_strength_element_info_alter in ./password_strength.module
Implements hook_element_info_alter().
password_strength_form_alter in ./password_strength.module
Implements hook_form_alter().

File

./password_strength.module, line 52
Provides password controls, validation, and strength checker.

Code

function password_strength_check_strength($account = NULL) {

  // Do not attempt to check if the password library is not available.
  if (!class_exists('ZxcvbnPhp\\Zxcvbn')) {
    return FALSE;
  }

  // @todo: hook for other modules to determine password strength rules
  return TRUE;
}