mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 10:49:23 +02:00
Dont invoke IP validation if its disabled in config.php
This commit is contained in:
parent
f64d190e54
commit
52956f8dab
12
register.php
12
register.php
@ -80,12 +80,14 @@ 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) {
|
||||||
$errors[] = 'Failed to recognize your IP address. (Not a valid IPv4 address).';
|
if (validate_ip(getIP()) === false) {
|
||||||
|
$errors[] = 'Failed to recognize your IP address. (Not a valid IPv4 address).';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (strlen($_POST['flag']) < 1) {
|
||||||
|
$errors[] = 'Please choose country.';
|
||||||
}
|
}
|
||||||
if (strlen($_POST['flag']) < 1) {
|
|
||||||
$errors[] = 'Please choose country.';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user