public static function Utilities::send_demo_query in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7
1 call to Utilities::send_demo_query()
File
- includes/
Utilities.php, line 198
Class
- Utilities
- This file is part of miniOrange SAML plugin.
Code
public static function send_demo_query($email, $query, $description) {
if (empty($email) || empty($description)) {
if (empty($email)) {
drupal_set_message(t('The <b>Email Address</b> field is required.'), 'error');
}
if (empty($description)) {
drupal_set_message(t('The <b>Description</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;
}
$phone = variable_get('miniorange_saml_customer_admin_phone');
$support = new MiniOrangeSamlSupport($email, $phone, $query, 'demo');
$support_response = $support
->sendSupportQuery();
if ($support_response) {
drupal_set_message(t('Your demo request has been sent successfully. We will get back to you soon.'));
}
else {
drupal_set_message(t('Error sending support query. Please try again.'), 'error');
}
}