Change GoogleReCAPTCHA.php to require_once

because conflicts with account_create_auto_login
This commit is contained in:
slawkens 2023-02-01 22:58:31 +01:00
parent e737cf612c
commit 036abf83e5
2 changed files with 3 additions and 3 deletions

View File

@ -84,9 +84,9 @@ else
$t = isset($tmp[$ip]) ? $tmp[$ip] : NULL; $t = isset($tmp[$ip]) ? $tmp[$ip] : NULL;
} }
if(config('recaptcha_enabled')) if(config('recaptcha_enabled') && !config('account_create_auto_login'))
{ {
require LIBS . 'GoogleReCAPTCHA.php'; require_once LIBS . 'GoogleReCAPTCHA.php';
if (!GoogleReCAPTCHA::verify('login')) { if (!GoogleReCAPTCHA::verify('login')) {
$errors[] = GoogleReCAPTCHA::getErrorMessage(); $errors[] = GoogleReCAPTCHA::getErrorMessage();
} }

View File

@ -74,7 +74,7 @@ if($save)
if(config('recaptcha_enabled')) if(config('recaptcha_enabled'))
{ {
require LIBS . 'GoogleReCAPTCHA.php'; require_once LIBS . 'GoogleReCAPTCHA.php';
if (!GoogleReCAPTCHA::verify('register')) { if (!GoogleReCAPTCHA::verify('register')) {
$errors['verification'] = GoogleReCAPTCHA::getErrorMessage(); $errors['verification'] = GoogleReCAPTCHA::getErrorMessage();
} }