disable captchas when debugging from localhost
This commit is contained in:
parent
4361bb0645
commit
d715c38341
@ -219,6 +219,9 @@ function theme_file($filepath) {
|
||||
|
||||
function captcha_get_html() {
|
||||
global $config, $user;
|
||||
|
||||
if(DEBUG && ip_in_range($_SERVER['REMOTE_ADDR'], "127.0.0.0/8")) return "";
|
||||
|
||||
$captcha = "";
|
||||
if($user->is_anonymous()) {
|
||||
$rpk = $config->get_string("api_recaptcha_pubkey");
|
||||
@ -239,6 +242,8 @@ function captcha_get_html() {
|
||||
function captcha_check() {
|
||||
global $config, $user;
|
||||
|
||||
if(DEBUG && ip_in_range($_SERVER['REMOTE_ADDR'], "127.0.0.0/8")) return true;
|
||||
|
||||
if($user->is_anonymous()) {
|
||||
$rpk = $config->get_string('api_recaptcha_privkey');
|
||||
if(!empty($rpk)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user