if (preg_match("([a-zA-Z\[\]]+)", $username))
Quote
Vyper69 wrote:
ok thanks ankur
Merged on Jul 20 2012 at 10:55:58:
LOL. I forgot to ask which file do i modify. That would help.
private function _settUserName() {
global $locale;
$this->_userName = isset($_POST['user_name']) ? stripinput(trim(preg_replace("/ +/i", " ", $_POST['user_name']))) : "";
if ($this->_userName != "" && $this->_userName != $this->userData['user_name']) {
if (!preg_check("/^[-0-9A-Z_@\s]+$/i", $this->_userName)) {
$this->_setError("user_name", $locale['u120']);
} else {
$name_active = dbcount("(user_id)", DB_USERS, "user_name='".$this->_userName."'");
$name_inactive = dbcount("(user_code)", DB_NEW_USERS, "user_name='".$this->_userName."'");
if ($name_active == 0 && $name_inactive == 0) {
$this->_userLogFields[] = "user_name";
$this->_setDBValue("user_name", $this->_userName);
} else {
$this->_setError("user_name", $locale['u121']);
}
}
} else {
$this->_setError("user_name", $locale['u122'], true);
}
}
if (!preg_check("/^[-0-9A-Z_@\s]+$/i", $this->_userName)) {
if (!preg_check("/^[-0-9A-Z_@\s\[\]]+$/i", $this->_userName)) {
if (!preg_check("/^[\w-0-9A-Z_@\s\[\]]+$/i", $this->_userName)) {
private function _settUserName() {
global $locale;
$this->_userName = isset($_POST['user_name']) ? stripinput(trim(preg_replace("/ +/i", " ", $_POST['user_name']))) : "";
if ($this->_userName != "" && $this->_userName != $this->userData['user_name']) {
[color=#ff3300] if (!preg_check("/^[-0-9A-Z_@\s]+$/i", $this->_userName)) {[/color]
$this->_setError("user_name", $locale['u120']);
} else {
$name_active = dbcount("(user_id)", DB_USERS, "user_name='".$this->_userName."'");
$name_inactive = dbcount("(user_code)", DB_NEW_USERS, "user_name='".$this->_userName."'");
if ($name_active == 0 && $name_inactive == 0) {
$this->_userLogFields[] = "user_name";
$this->_setDBValue("user_name", $this->_userName);
} else {
$this->_setError("user_name", $locale['u121']);
}
}
} else {
$this->_setError("user_name", $locale['u122'], true);
}
}
if (!preg_check("/^[-0-9A-Z_@\s\ě\š\č\ř\ý\á\í\é]+$/i", $this->_userName)) {
if (!preg_match("/^[\p{L}a-zA-Z\s]+$/", $this->_userName)) {
Quote
CrackCZ wrote:
Unfortunately I still have a problem or your advice helped. butt with [] mentions went out to work these brackets. But my characters do not work :-/
Where can you be more error? :-(
if (!preg_check("/^[\w-0-9A-Z_@\s\[\]]+$/i", $this->_userName)) {
// Locale Settings
setlocale(LC_TIME, "cs_CS.utf8","CS"); // Linux Server (Windows may differ)
$locale['charset'] = "utf-8";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";
// Locale Settings
setlocale(LC_TIME, "cs_CS.utf8","CS"); // Linux Server (Windows may differ)
$locale['charset'] = "utf-8";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";
$locale['recaptcha'] = "cs";
// Locale Settings
setlocale(LC_TIME, "cs_CZ.utf8","CS"); // Linux Server (Windows may differ)
$locale['charset'] = "utf-8";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";
// Locale Settings
setlocale(LC_TIME, "cs_CZ.ISO8859-2","CZ"); // Linux Server (Windows may differ)
$locale['charset'] = "utf-8";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";
// Locale Settings
setlocale(LC_TIME, "cs_CZ","CZ");
$locale['charset'] = "Windows-1250";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";
// Locale Settings
setlocale(LC_ALL, 'sk_SK', 'slovak');
$locale['charset'] = "Windows-1250";
$locale['xml_lang'] = "sk";
$locale['tinymce'] = "sk";
$locale['phpmailer'] = "sk";
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
6 participants
Notifications
You are not receiving notifications from this thread.
Related Questions