You are here

function password_policy_update_policy in Password Policy 5

Updates the given policy instance with the given policy id in the database.

Parameters

$pid: The id of the policy to update.

$policy: An object instance of type And_Constraint

1 call to password_policy_update_policy()
password_policy_form_policy_form_submit in ./password_policy.module
Form submission hook for new or edited password policies.

File

./password_policy.module, line 642

Code

function password_policy_update_policy($pid, $policy) {
  db_query("UPDATE {password_policy} SET name = '%s', description = '%s', serialized_policy = '%s' WHERE id = %d", $policy->name, $policy->description, serialize($policy), $pid);
}