You are here

function sms_clickatell_admin_form_validate in SMS Framework 5

Same name and namespace in other branches
  1. 6 modules/sms_clickatell/sms_clickatell.module \sms_clickatell_admin_form_validate()

Validates the submission of the configuration form.

File

modules/sms_clickatell/sms_clickatell.module, line 60
Adds support for sending SMS messages using the Clickatell gateway.

Code

function sms_clickatell_admin_form_validate($form_id, $form_values) {
  $result = sms_clickatell_command('auth', array(), $form_values);
  if (!$result['status']) {
    form_set_error('', t('A Clickatell gateway error occured: @error.', array(
      '@error' => $result['message'],
    )));
  }
  variable_set('sms_clickatell_session_id_timestamp', 0);
}