You are here

function commerceguys_marketplace_get_client in Commerce Guys Marketplace 7

Returns the oAuth2 client info used for authenticating the current site.

Return value

An array with the client_key and client_secret keys, or FALSE if no client information could be found.

3 calls to commerceguys_marketplace_get_client()
commerceguys_marketplace_addons_page in includes/commerceguys_marketplace.pages.inc
Page callback: Returns a paginated, facetted list of addons.
commerceguys_marketplace_frontpage in includes/commerceguys_marketplace.pages.inc
Page callback: Returns the marketplace frontpage.
commerceguys_marketplace_get_manager in ./commerceguys_marketplace.module
Returns an instance of a marketplace manager class.

File

./commerceguys_marketplace.module, line 371
Connector module for http://marketplace.commerceguys.com

Code

function commerceguys_marketplace_get_client() {
  $api_key = variable_get('commerceguys_marketplace_api_key', '');
  if (!empty($api_key) && strpos($api_key, ';')) {
    $key_parts = explode(';', $api_key);
    return array(
      'client_key' => $key_parts[0],
      'client_secret' => $key_parts[1],
    );
  }
  return FALSE;
}