public function UsersAPIHandler::create in Google Authenticator / 2 Factor Authentication - 2FA 8
Same name and namespace in other branches
- 8.2 src/UsersAPIHandler.php \Drupal\miniorange_2fa\UsersAPIHandler::create()
File
- src/
UsersAPIHandler.php, line 58
Class
Namespace
Drupal\miniorange_2faCode
public function create(MiniorangeUser $user) {
$fields = array(
'customerKey' => $this->customerId,
'username' => $user
->getUsername(),
'firstName' => $user
->getName(),
);
$json = json_encode($fields);
$url = MoAuthConstants::$USERS_CREATE_API;
return MoAuthUtilities::callService($this->customerId, $this->apiKey, $url, $json);
}