You are here

public static function Utilities::send_query in Drupal OAuth & OpenID Connect Login - OAuth2 Client SSO Login 7

This function sends the support query

5 calls to Utilities::send_query()
send_support_query in ./miniorange_config.php
Send support query.
send_support_query in ./miniorange_oauth_client_attr_mapping.inc
Send support query.
send_support_query in ./miniorange_oauth_client_reports.inc
Send support query.
send_support_query in ./miniorange_oauth_client_customer_setup.inc
Send support query.
send_support_query in ./miniorange_oauth_login_options.inc
Send support query.

File

includes/Utilities.php, line 165

Class

Utilities

Code

public static function send_query($email, $phone, $query) {
  if (empty($email) || empty($query)) {
    if (empty($email)) {
      drupal_set_message(t('The <b>Email Address</b> field is required.'), 'error');
    }
    if (empty($query)) {
      drupal_set_message(t('The <b>Query</b> field is required.'), 'error');
    }
    return;
  }
  if (!valid_email_address($email)) {
    drupal_set_message(t('The email address <b><u>' . $email . '</u></b> is not valid.'), 'error');
    return;
  }
  $support = new MiniorangeOAuthClientSupport($email, $phone, $query);
  $support_response = $support
    ->sendSupportQuery();
  if ($support_response) {
    drupal_set_message(t('Support query sent successfully. We will get back to you shortly!'));
  }
  else {
    drupal_set_message(t('Error sending support query'), 'error');
  }
}