You are here

function acquia_lift_agent_clear_verified_status in Acquia Lift Connector 7

Helper function to clear the cache of the verification status for a particular agent.

Parameters

string $agent_name: The machine name of the agent that should have cache cleared. If not passed, entire cache will be cleared.

7 calls to acquia_lift_agent_clear_verified_status()
acquia_lift_personalize_agent_delete in ./acquia_lift.module
Implements hook_personalize_agent_delete().
acquia_lift_personalize_agent_update_status in ./acquia_lift.module
Implements hook_personalize_agent_update_status().
acquia_lift_personalize_goal_delete in ./acquia_lift.module
Implements hook_personalize_goal_delete().
acquia_lift_personalize_goal_save in ./acquia_lift.module
Implements hook_personalize_goal_save().
acquia_lift_personalize_option_set_delete in ./acquia_lift.module
Implements hook_personalize_option_set_delete().

... See full list

File

./acquia_lift.module, line 3124
acquia_lift.module Provides Acquia Lift-specific personalization functionality.

Code

function acquia_lift_agent_clear_verified_status($agent_name = NULL) {
  $cache = cache_get(ACQUIA_LIFT_AGENT_VERIFY_CACHE);
  if (!$cache) {
    return;
  }
  $verification = $cache->data;
  if (empty($agent_name)) {
    $verification = array();
  }
  else {
    if (isset($verification[$agent_name])) {
      unset($verification[$agent_name]);
    }
  }
  cache_set(ACQUIA_LIFT_AGENT_VERIFY_CACHE, $verification);
}