fixes by songeriux + minor changes

This commit is contained in:
unknown
2012-06-08 17:04:17 +03:00
parent 8e68cf71bd
commit 16313402e6
10 changed files with 162 additions and 244 deletions
+8 -3
View File
@@ -3,7 +3,7 @@
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename Account.php ##
## Developed by: Dzoki ##
## Developed by: Songer & Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
@@ -57,7 +57,9 @@ class Account {
}
else if($database->checkExist_activate($_POST['name'],0)) {
$form->addError("name",USRNM_TAKEN);
}
} elseif(preg_replace("/[a-zA-Z0-9_-]/","",$_POST['name'])){
$form->addError("name","Unusable simbols. Allowed text format: a-z, A-Z, 0-9 and _ -");
}
}
if(!isset($_POST['pw']) || $_POST['pw'] == "") {
@@ -69,7 +71,10 @@ class Account {
}
else if($_POST['pw'] == $_POST['name']) {
$form->addError("pw",PW_INSECURE);
}
} elseif(preg_replace("/[a-zA-Z0-9]/","",$_POST['pw'])){
$form->addError("name","Unusable simbols. Allowed text format: a-z, A-Z, 0-9");
}
}
if(!isset($_POST['email'])) {
$form->addError("email",EMAIL_EMPTY);