From 31b79d6471a639a46db5d82742a170ec35ad5b3f Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sun, 8 May 2022 13:22:14 +0200 Subject: [PATCH] distinct error messages for loginname begins with customer.prefix and loginname exists on the system Signed-off-by: Michael Kaufmann --- lib/Froxlor/Api/Commands/Customers.php | 2 +- lng/de.lng.php | 3 ++- lng/en.lng.php | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Froxlor/Api/Commands/Customers.php b/lib/Froxlor/Api/Commands/Customers.php index ca1c1306..da0f1a31 100644 --- a/lib/Froxlor/Api/Commands/Customers.php +++ b/lib/Froxlor/Api/Commands/Customers.php @@ -424,7 +424,7 @@ class Customers extends ApiCommand implements ResourceEntity // Accounts which match systemaccounts are not allowed, filtering them if (preg_match('/^' . preg_quote(Settings::Get('customer.accountprefix'), '/') . '([0-9]+)/', $loginname)) { - Response::standardError('loginnameissystemaccount', Settings::Get('customer.accountprefix'), true); + Response::standardError('loginnameisusingprefix', Settings::Get('customer.accountprefix'), true); } // Additional filtering for Bug #962 diff --git a/lng/de.lng.php b/lng/de.lng.php index e6859dfc..f99fc7e8 100644 --- a/lng/de.lng.php +++ b/lng/de.lng.php @@ -756,7 +756,8 @@ return [ 'webmailiswrong' => 'Die "Webmail-URL" ist keine gültige URL.', 'webftpiswrong' => 'Die "WebFTP-URL" ist keine gültige URL.', 'stringformaterror' => 'Der Wert des Feldes "%s" hat nicht das erwartete Format.', - 'loginnameissystemaccount' => 'Sie können keinen Account anlegen, der wie ein Systemaccount aussieht (also zum Beispiel mit "%s" anfängt). Bitte wählen Sie einen anderen Accountnamen.', + 'loginnameisusingprefix' => 'Sie können keinen Account anlegen, der mit "%s" beginnt, da dieser Prefix für die automatische Namensvergabe eingestellt ist. Bitte wählen Sie einen anderen Accountnamen.', + 'loginnameissystemaccount' => 'Der Account "%s" existiert bereits auf dem System und kann daher nicht verwendet werden. Bitte wählen Sie einen anderen Accountnamen.', 'youcantdeleteyourself' => 'Aus Sicherheitsgründen können Sie sich nicht selbst löschen.', 'youcanteditallfieldsofyourself' => 'Hinweis: Aus Sicherheitsgründen können Sie nicht alle Felder Ihres eigenen Accounts bearbeiten.', 'documentrootexists' => 'Es existiert noch ein Verzeichnis "%s" für diesen Kunden. Bitte löschen Sie dieses vorher.', diff --git a/lng/en.lng.php b/lng/en.lng.php index 8a0a6c70..9c738ddb 100644 --- a/lng/en.lng.php +++ b/lng/en.lng.php @@ -1050,7 +1050,8 @@ return [ 'webmailiswrong' => 'The webmail-link is not a valid link.', 'webftpiswrong' => 'The WebFTP-link is not a valid link.', 'stringformaterror' => 'The value for the field "%s" is not in the expected format.', - 'loginnameissystemaccount' => 'You cannot create accounts which are similar to system accounts (as for example begin with "%s"). Please enter another account name.', + 'loginnameisusingprefix' => 'You cannot create accounts that begin with "%s", as this prefix is set to be used for the automatic account-naming. Please enter another account name.', + 'loginnameissystemaccount' => 'The account "%s" already exists on the system and cannot be used. Please enter another account name.', 'youcantdeleteyourself' => 'You cannot delete yourself for security reasons.', 'youcanteditallfieldsofyourself' => 'Note: You cannot edit all fields of your own account for security reasons.', 'documentrootexists' => 'The directory "%s" already exists for this customer. Please remove this before adding the customer again.',