You are here

function acquia_lift_get_pending_agents in Acquia Lift Connector 7

Gets the list of currently "pending" agents.

Parameters

bool $clear: Whether to clear the list.

Return value

array An array of agents with machine names as keys and human-readable names as values.

1 call to acquia_lift_get_pending_agents()
acquia_lift_build_page in ./acquia_lift.ui.inc
Attaches the front-end controls to the page.

File

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

Code

function acquia_lift_get_pending_agents($clear = TRUE) {
  if (!isset($_SESSION['acquia_lift_pending_agents'])) {
    return array();
  }
  $pending = $_SESSION['acquia_lift_pending_agents'];
  if ($clear) {
    unset($_SESSION['acquia_lift_pending_agents']);
  }
  return $pending;
}