You are here

public static function PasswordPolicy::enabledPolicies in Password Policy 7.2

Retrieves all enabled policies.

Return value

PasswordPolicy[] Enabled policies.

3 calls to PasswordPolicy::enabledPolicies()
PasswordPolicy::matchedPolicies in includes/PasswordPolicy.inc
Retrieves all policies that match the current account.
PasswordPolicyTestCase::testLoadPolicy in ./password_policy.test
Tests the loading of CTools-based policies.
password_policy_cron in ./password_policy.module
Implements hook_cron().

File

includes/PasswordPolicy.inc, line 279
Contains PasswordPolicy.

Class

PasswordPolicy
Defines a class used for managing Password Policies.

Code

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