From 5905c0e89e441e07aa6258a1b211526b4baff3eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 30 Nov 2022 17:37:29 +0100 Subject: [PATCH] Fix error message --- htdocs/langs/en_US/errors.lang | 2 +- htdocs/user/class/user.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }