mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Support methods to load and check CAPTCHA wherever a developer wants
This commit is contained in:
parent
01984210b6
commit
307661b57b
10 changed files with 127 additions and 11 deletions
|
|
@ -20,9 +20,12 @@ class reCAPTCHA
|
|||
self::$config = $config;
|
||||
}
|
||||
|
||||
public static function check()
|
||||
public static function check($response = null)
|
||||
{
|
||||
$response = Context::get('g-recaptcha-response');
|
||||
if (!$response)
|
||||
{
|
||||
$response = Context::get('g-recaptcha-response');
|
||||
}
|
||||
if (!$response)
|
||||
{
|
||||
throw new Exception('msg_recaptcha_invalid_response');
|
||||
|
|
|
|||
|
|
@ -20,9 +20,12 @@ class Turnstile
|
|||
self::$config = $config;
|
||||
}
|
||||
|
||||
public static function check()
|
||||
public static function check($response = null)
|
||||
{
|
||||
$response = Context::get('g-recaptcha-response');
|
||||
if (!$response)
|
||||
{
|
||||
$response = Context::get('g-recaptcha-response');
|
||||
}
|
||||
if (!$response)
|
||||
{
|
||||
throw new Exception('msg_recaptcha_invalid_response');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue