You are here

public function UsersAPIHandler::search in Google Authenticator / 2 Factor Authentication - 2FA 7

File

classes/UsersAPIHandler.php, line 54

Class

UsersAPIHandler

Code

public function search(MiniorangeUser $user) {
  $fields = array(
    'customerKey' => $user
      ->getCustomerId(),
    'username' => $user
      ->getUsername(),
  );
  $json = json_encode($fields);
  $url = MoAuthConstants::getBaseUrl() . MoAuthConstants::$USERS_SEARCH_API;
  return MoAuthUtilities::callService($this->customerId, $this->apiKey, $url, $json);
}