You are here

public static function PasswordPolicy::allPolicies in Password Policy 7.2

Retrieves all policies.

Return value

array Associative array where keys are policy names and values are password policies (i.e. PasswordPolicy objects).

File

includes/PasswordPolicy.inc, line 263
Contains PasswordPolicy.

Class

PasswordPolicy
Defines a class used for managing Password Policies.

Code

public static function allPolicies() {
  ctools_include('export');
  $policies = array();
  $infos = ctools_export_crud_load_all('password_policy');
  foreach ($infos as $name => $info) {
    $policies[$name] = new PasswordPolicy($info);
  }
  return $policies;
}