You are here

public function MiniorangeUser::get in Google Authenticator / 2 Factor Authentication - 2FA 8

Same name and namespace in other branches
  1. 8.2 src/MiniorangeUser.php \Drupal\miniorange_2fa\MiniorangeUser::get()

File

src/MiniorangeUser.php, line 55

Class

MiniorangeUser

Namespace

Drupal\miniorange_2fa

Code

public function get() {
  $apiKey = \Drupal::config('miniorange_2fa.settings')
    ->get('mo_auth_customer_api_key') == '' ? NULL : \Drupal::config('miniorange_2fa.settings')
    ->get('mo_auth_customer_api_key');
  if (empty($this->customerId) || empty($apiKey)) {
    return FALSE;
  }
  $usersAPIHandler = new UsersAPIHandler($this->customerId, $apiKey);
  $response = $usersAPIHandler
    ->get($this);
}