cms.authenticator.php 361 B

1234567891011
  1. <?php
  2. if (core::ifPost("from") and core::getPost("from") == "authenticator") {
  3. $result = user::checkGoogleAuthenticator(core::getPost("email"));
  4. // Retourner du JSON valide pour la requête AJAX
  5. header('Content-Type: application/json');
  6. echo json_encode([
  7. 'authenticator' => (int)$result,
  8. 'required' => ($result == 1)
  9. ]);
  10. }