function hubspot_oauth_submit in HubSpot 6.2
Same name and namespace in other branches
- 7.3 hubspot.admin.inc \hubspot_oauth_submit()
- 7.2 hubspot.admin.inc \hubspot_oauth_submit()
1 string reference to 'hubspot_oauth_submit'
- hubspot_admin_settings in ./
hubspot.admin.inc - @file Provides admin settings page to adjust HubSpot API key, debugging settings, and JavaScript embedding.
File
- ./
hubspot.admin.inc, line 98 - Provides admin settings page to adjust HubSpot API key, debugging settings, and JavaScript embedding.
Code
function hubspot_oauth_submit($form, &$form_state) {
global $base_root;
$data = 'client_id=' . HUBSPOT_CLIENT_ID . '&portalId=' . $form_state['values']['hubspot_portalid'] . '&redirect_uri=' . $base_root . '/admin/settings/hubspot' . '&scope=' . 'leads-rw+offline';
$form_state['redirect'][] = 'https://app.hubspot.com/auth/authenticate?' . $data;
}