Function __global->check_captcha
Definitions
sources/captcha.php
- Checks a CAPTCHA.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $code_entered | ?string | No | No | Null | N/A | N/A | CAPTCHA entered (null: read from standard-named parameter) |
| $regenerate_on_error | boolean | No | No | True | N/A | N/A | Whether to possibly regenerate upon error |
| &$error_message | ?Tempcode | Yes | No | Null | N/A | N/A | Error message to write out (null: none) |
Returns
- Whether it is valid for the current session
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Checks a CAPTCHA.
*
* @param ?string $code_entered CAPTCHA entered (null: read from standard-named parameter)
* @param boolean $regenerate_on_error Whether to possibly regenerate upon error
* @param ?Tempcode $error_message Error message to write out (null: none)
* @return boolean Whether it is valid for the current session
*/
function check_captcha(?string $code_entered = null, bool $regenerate_on_error = true, ?object &$error_message = null) : bool
* Checks a CAPTCHA.
*
* @param ?string $code_entered CAPTCHA entered (null: read from standard-named parameter)
* @param boolean $regenerate_on_error Whether to possibly regenerate upon error
* @param ?Tempcode $error_message Error message to write out (null: none)
* @return boolean Whether it is valid for the current session
*/
function check_captcha(?string $code_entered = null, bool $regenerate_on_error = true, ?object &$error_message = null) : bool

