mirror of
https://github.com/openvk/commitcaptcha.git
synced 2024-12-22 16:41:09 +03:00
Refactor check_captcha(...)
This commit is contained in:
parent
8bb31718d1
commit
444fe447c3
1 changed files with 4 additions and 1 deletions
|
@ -14,8 +14,11 @@ HTML;
|
||||||
return COMMITCAPTCHA_ROOT_CONF["commitcaptcha"]["enable"] ? $html : "You have already verified that you are not a robot.";
|
return COMMITCAPTCHA_ROOT_CONF["commitcaptcha"]["enable"] ? $html : "You have already verified that you are not a robot.";
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_captcha(?string $input): bool
|
function check_captcha(?string $input = NULL): bool
|
||||||
{
|
{
|
||||||
|
if(!$input)
|
||||||
|
$input = $_POST["captcha"] ?? 0;
|
||||||
|
|
||||||
return CaptchaManager::i()->verifyCaptcha((string) $input);
|
return CaptchaManager::i()->verifyCaptcha((string) $input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue