public function UsersAPIHandler::update in Google Authenticator / 2 Factor Authentication - 2FA 8.2
Same name and namespace in other branches
- 8 src/UsersAPIHandler.php \Drupal\miniorange_2fa\UsersAPIHandler::update()
File
- src/
UsersAPIHandler.php, line 14
Class
Namespace
Drupal\miniorange_2faCode
public function update(MiniorangeUser $user) {
$fields = array(
'customerKey' => $user
->getCustomerId(),
'username' => $user
->getUsername(),
'phone' => $user
->getPhone(),
'authType' => $user
->getAuthType(),
'transactionName' => MoAuthConstants::$PLUGIN_NAME,
);
$json = json_encode($fields);
$url = MoAuthConstants::getBaseUrl() . MoAuthConstants::$USERS_UPDATE_API;
return MoAuthUtilities::callService($this->customerId, $this->apiKey, $url, $json);
}