mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 03:09:22 +02:00
Fixed OTHIRE account registration bug
This commit is contained in:
parent
e64032e630
commit
15689d3aed
15
register.php
15
register.php
@ -37,13 +37,16 @@ if (empty($_POST) === false) {
|
|||||||
$errors[] = 'This account name is blocked for registration.';
|
$errors[] = 'This account name is blocked for registration.';
|
||||||
}
|
}
|
||||||
if ($config['ServerEngine'] !== 'OTHIRE' && $config['client'] >= 830) {
|
if ($config['ServerEngine'] !== 'OTHIRE' && $config['client'] >= 830) {
|
||||||
if (preg_match("/^[a-zA-Z0-9]+$/", $_POST['username']) == false) {
|
if (preg_match("/^[a-zA-Z0-9]+$/", $_POST['username']) == false) {
|
||||||
$errors[] = 'Your account name can only contain characters a-z, A-Z and 0-9.';
|
$errors[] = 'Your account name can only contain characters a-z, A-Z and 0-9.';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (preg_match("/^[0-9]+$/", $_POST['username']) == false) {
|
if (preg_match("/^[0-9]+$/", $_POST['username']) == false) {
|
||||||
$errors[] = 'Your account can only contain numbers 0-9.';
|
$errors[] = 'Your account can only contain numbers 0-9.';
|
||||||
}
|
}
|
||||||
|
if ((int)$_POST['username'] < 100000 || (int)$_POST['username'] > 999999999) {
|
||||||
|
$errors[] = 'Your account number must be a value between 6-8 numbers long.';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// name restriction
|
// name restriction
|
||||||
$resname = explode(" ", $_POST['username']);
|
$resname = explode(" ", $_POST['username']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user