You are here

function lockr_admin_request_submit in Lockr 7

Submit the certificate request form.

1 string reference to 'lockr_admin_request_submit'
lockr_admin_request_form in include/request_form.inc
Returns the certificate request form.

File

include/request_form.inc, line 46
Form handlers for the certificate request form.

Code

function lockr_admin_request_submit($form, &$form_state) {
  $values = $form_state['values'];
  $ch = curl_init('https://lockr.io/api/v2/request-certificate');
  curl_setopt_array($ch, array(
    CURLOPT_POST => TRUE,
    CURLOPT_POSTFIELDS => array(
      'email' => $values['email'],
      'partner' => $values['partner'],
    ),
  ));
  curl_exec($ch);
  variable_set('lockr_request', TRUE);
  drupal_set_message(t('Thank you for letting us know! ' . "We'll email you shortly with further instructions."));
}