mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
Fixed OTHIRE account registration bug
This commit is contained in:
parent
a76e468645
commit
e64032e630
@ -1243,7 +1243,7 @@ function user_create_account($register_data, $maildata) {
|
|||||||
|
|
||||||
mysql_insert("INSERT INTO `accounts` ($fields) VALUES ($data)");
|
mysql_insert("INSERT INTO `accounts` ($fields) VALUES ($data)");
|
||||||
|
|
||||||
$account_id = user_id($register_data['name']);
|
$account_id = (isset($register_data['name'])) ? user_id($register_data['name']) : user_id($register_data['id']);
|
||||||
$activeKey = rand(100000000,999999999);
|
$activeKey = rand(100000000,999999999);
|
||||||
$active = ($maildata['register']) ? 0 : 1;
|
$active = ($maildata['register']) ? 0 : 1;
|
||||||
mysql_insert("INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `active`, `activekey`, `flag`) VALUES ('$account_id', '$ip', '$created', '$active', '$activeKey', '$flag')");
|
mysql_insert("INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `active`, `activekey`, `flag`) VALUES ('$account_id', '$ip', '$created', '$active', '$activeKey', '$flag')");
|
||||||
|
@ -36,7 +36,7 @@ if (empty($_POST) === false) {
|
|||||||
if ($isNoob) {
|
if ($isNoob) {
|
||||||
$errors[] = 'This account name is blocked for registration.';
|
$errors[] = 'This account name is blocked for registration.';
|
||||||
}
|
}
|
||||||
if ($config['ServerEngine'] !== 'OTHIRE') {
|
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.';
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ if (empty($_POST) === false) {
|
|||||||
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.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// name restriction
|
// name restriction
|
||||||
$resname = explode(" ", $_POST['username']);
|
$resname = explode(" ", $_POST['username']);
|
||||||
foreach($resname as $res) {
|
foreach($resname as $res) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user