You are here

function commerceguys_marketplace_connect_page in Commerce Guys Marketplace 7

Page callback: Stores the provided api key and redirects to the frontpage.

1 string reference to 'commerceguys_marketplace_connect_page'
commerceguys_marketplace_menu in ./commerceguys_marketplace.module
Implements hook_menu().

File

includes/commerceguys_marketplace.pages.inc, line 205
Page callbacks for the Marketplace module.

Code

function commerceguys_marketplace_connect_page() {
  if (empty($_GET['api_key'])) {
    return drupal_not_found();
  }
  $api_key = $_GET['api_key'];
  variable_set('commerceguys_marketplace_api_key', $api_key);
  drupal_goto('commerceguys-marketplace', array(
    'query' => array(
      'connected' => 1,
    ),
  ));
}