You are here

public static function Utilities::send_query in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

1 call to Utilities::send_query()
Utilities::send_support_query in includes/Utilities.php

File

includes/Utilities.php, line 313

Class

Utilities
This file is part of miniOrange SAML plugin.

Code

public static function send_query($email, $phone, $query) {
  if (empty($email) || empty($query)) {
    drupal_set_message(t('The <b>Email</b> and<b> Query</b> fields are mandatory.'), '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 MiniOrangeSamlSupport($email, $phone, $query);
  $support_response = $support
    ->sendSupportQuery();
  if ($support_response) {
    drupal_set_message(t('Thank you for getting in touch. We will get back to you shortly.'));
  }
  else {
    drupal_set_message(t('Error sending support query'), 'error');
  }
}