You are here

function _recaptcha_v3_get_action_by_id in reCAPTCHA v3 7

Return recaptcha v3 action by given id.

See also

form_validate_machine_name()

2 calls to _recaptcha_v3_get_action_by_id()
recaptcha_v3_element_captcha_process in ./recaptcha_v3.module
Need to validate recaptcha v3 token value here, because otherwise in case of failed verification it is no way how to replace captcha element type.
recaptcha_v3_token_element in ./recaptcha_v3.module
Form element for recaptcha v3.

File

./recaptcha_v3.module, line 302
Verifies if user is a human without necessity to solve a CAPTCHA.

Code

function _recaptcha_v3_get_action_by_id($id) {
  return db_select('recaptcha_v3_actions', 'a')
    ->fields('a')
    ->condition('id', $id)
    ->execute()
    ->fetchAssoc();
}