You are here

function acquia_agent_subscription_is_active in Acquia Connector 6.2

Same name and namespace in other branches
  1. 6 acquia_agent/acquia_agent.module \acquia_agent_subscription_is_active()
  2. 7.3 acquia_agent/acquia_agent.module \acquia_agent_subscription_is_active()
  3. 7 acquia_agent/acquia_agent.module \acquia_agent_subscription_is_active()
  4. 7.2 acquia_agent/acquia_agent.module \acquia_agent_subscription_is_active()

Helper function to check if the site has an active subscription.

2 calls to acquia_agent_subscription_is_active()
acquia_agent_check_subscription in acquia_agent/acquia_agent.module
Get subscription status from Acquia, and store the result.
acquia_agent_requirements in acquia_agent/acquia_agent.install
Implementation of hook_requirements()

File

acquia_agent/acquia_agent.module, line 663
Acquia Agent securely sends information to Acquia.

Code

function acquia_agent_subscription_is_active() {
  $active = FALSE;

  // Subscription cannot be active if we have no credentials.
  if (acquia_agent_has_credentials()) {
    $subscription = acquia_agent_settings('acquia_subscription_data');
    $active = !empty($subscription['active']);
  }
  return $active;
}