public function PasswordPolicy::__construct in Password Policy 7.2
Constructor for PasswordPolicy.
Parameters
object $policy: Database object as returned by ctools_export_crud_load().
File
- includes/
PasswordPolicy.inc, line 23 - Contains PasswordPolicy.
Class
- PasswordPolicy
- Defines a class used for managing Password Policies.
Code
public function __construct($policy = NULL) {
if ($policy == NULL) {
ctools_include('export');
$policy = ctools_export_crud_new('password_policy');
}
$this->name = $policy->name;
$this->config = isset($policy->config) ? unserialize($policy->config) : array();
// Load all constraint objects.
$this
->loadPlugins();
}