function hubspot_oauth_submit in HubSpot 7.3
Same name and namespace in other branches
- 6.2 hubspot.admin.inc \hubspot_oauth_submit()
- 7.2 hubspot.admin.inc \hubspot_oauth_submit()
Form submission handler for hubspot_admin_settings().
1 string reference to 'hubspot_oauth_submit'
- hubspot_admin_settings in ./
hubspot.admin.inc - Form constructor for the Hubspot admin settings form.
File
- ./
hubspot.admin.inc, line 123 - Provides admin settings page to adjust HubSpot API key, debugging settings, JavaScript embedding, and form submission settings.
Code
function hubspot_oauth_submit($form, &$form_state) {
$data = array(
'client_id' => HUBSPOT_CLIENT_ID,
'portalId' => $form_state['values']['hubspot_portalid'],
'redirect_uri' => url('hubspot/oauth', array(
'query' => drupal_get_destination(),
'absolute' => TRUE,
)),
'scope' => HUBSPOT_SCOPE,
);
$form_state['redirect'][] = url('https://app.hubspot.com/auth/authenticate', array(
'query' => $data,
));
}