1 user.password.inc user_password_reject_weak($username)

Get the password strength score required for an account.

Parameters

object $username: Backdrop username.

Return value

bool: True or false.

File

core/modules/user/user.password.inc, line 16
Password callback file for the user module.

Code

function user_password_reject_weak($username) {
  // We use username instead of uid because this also runs for anonymous
  // users who are creating an account.
  $account = user_load_by_name($username);
  $reject_weak = config_get('system.core', 'user_password_reject_weak');

  // Allow other modules to alter this value (e.g. based on role).
  backdrop_alter('user_password_reject_weak', $reject_weak, $account);

  return $reject_weak;
}