Update user.class.php
This commit is contained in:
parent
5a8b2c9560
commit
6677eccf45
@ -1393,7 +1393,7 @@ class User extends CommonObject
|
||||
|
||||
dol_syslog(get_class($this)."::create login=".$this->login.", user=".(is_object($user) ? $user->id : ''), LOG_DEBUG);
|
||||
|
||||
$badCharUnauthorizedIntoLoginName = getDolGlobalString('MAIN_LOGIN_BADCHARUNAUTHORIZED', '/[,@<>"\']/');
|
||||
$badCharUnauthorizedIntoLoginName = getDolGlobalString('MAIN_LOGIN_BADCHARUNAUTHORIZED', ',@<>"\'');
|
||||
|
||||
// Check parameters
|
||||
if (!empty($conf->global->USER_MAIL_REQUIRED) && !isValidEMail($this->email)) {
|
||||
@ -1405,7 +1405,7 @@ class User extends CommonObject
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login"));
|
||||
return -1;
|
||||
} elseif (preg_match($badCharUnauthorizedIntoLoginName, $this->login)) {
|
||||
} elseif (preg_match('/['.preg_quote($badCharUnauthorizedIntoLoginName, '/').']/', $this->login)) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
|
||||
return -1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user