diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 8cbd8a5588b..b3eeae4606b 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -280,7 +280,7 @@ ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. ErrorIsNotADraft=%s is not a draft ErrorExecIdFailed=Can't execute command "id" -ErrorBadCharIntoLoginName=Unauthorized character in the login name +ErrorBadCharIntoLoginName=Unauthorized character in the field %s ErrorRequestTooLarge=Error, request too large or session expired ErrorNotApproverForHoliday=You are not the approver for leave %s ErrorAttributeIsUsedIntoProduct=This attribute is used in one or more product variants diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index d49f810f915..75c9f1b2bae 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1522,7 +1522,7 @@ class User extends CommonObject return -1; } elseif (preg_match('/['.preg_quote($badCharUnauthorizedIntoLoginName, '/').']/', $this->login)) { $langs->load("errors"); - $this->error = $langs->trans("ErrorBadCharIntoLoginName"); + $this->error = $langs->trans("ErrorBadCharIntoLoginName", $langs->transnoentitiesnoconv("Login")); return -1; } @@ -1918,7 +1918,7 @@ class User extends CommonObject return -1; } elseif (preg_match('/['.preg_quote($badCharUnauthorizedIntoLoginName, '/').']/', $this->login)) { $langs->load("errors"); - $this->error = $langs->trans("ErrorBadCharIntoLoginName"); + $this->error = $langs->trans("ErrorBadCharIntoLoginName", $langs->transnoentitiesnoconv("Login")); return -1; }