You are here

public static function MoAuthUtilities::send_support_query in Google Authenticator / 2 Factor Authentication - 2FA 8.2

Same name and namespace in other branches
  1. 8 src/MoAuthUtilities.php \Drupal\miniorange_2fa\MoAuthUtilities::send_support_query()

SEND SUPPORT QUERY | NEW FEATURE REQUEST | DEMO REQUEST

_type = Support | Demo Request | New Feature Request

Parameters

$email:

$phone:

$query:

1 call to MoAuthUtilities::send_support_query()
MoAuthSupport::submitForm in src/Form/MoAuthSupport.php
Form submission handler.

File

src/MoAuthUtilities.php, line 121
This file is part of miniOrange 2FA module.

Class

MoAuthUtilities

Namespace

Drupal\miniorange_2fa

Code

public static function send_support_query($email, $phone, $query, $query_type) {
  $support = new Miniorange2FASupport($email, $phone, $query, $query_type);
  $support_response = $support
    ->sendSupportQuery();
  if ($support_response->status == 'CURL_ERROR') {
    \Drupal::messenger()
      ->addError(t('cURL is not enabled. Please enable cURL'));
    return;
  }
  elseif ($support_response) {
    \Drupal::messenger()
      ->addStatus(t('Thanks for getting in touch! We will get back to you shortly.'));
  }
  else {
    \Drupal::messenger()
      ->addError(t('Error submitting the support query. Please send us your query at <a href="mailto:info@xecurify.com">info@xecurify.com</a>.'));
  }
}