mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
Dont invoke IP validation if its disabled in config.php
This commit is contained in:
parent
f64d190e54
commit
52956f8dab
@ -80,9 +80,11 @@ if (empty($_POST) === false) {
|
|||||||
if ($_POST['selected'] != 1) {
|
if ($_POST['selected'] != 1) {
|
||||||
$errors[] = 'You are only allowed to have an account if you accept the rules.';
|
$errors[] = 'You are only allowed to have an account if you accept the rules.';
|
||||||
}
|
}
|
||||||
if (validate_ip(getIP()) === false && $config['validate_IP'] === true) {
|
if ($config['validate_IP'] === true) {
|
||||||
|
if (validate_ip(getIP()) === false) {
|
||||||
$errors[] = 'Failed to recognize your IP address. (Not a valid IPv4 address).';
|
$errors[] = 'Failed to recognize your IP address. (Not a valid IPv4 address).';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (strlen($_POST['flag']) < 1) {
|
if (strlen($_POST['flag']) < 1) {
|
||||||
$errors[] = 'Please choose country.';
|
$errors[] = 'Please choose country.';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user