From 69deac7a220db0fb3f5c034248c33af7c937f283 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 7 Mar 2018 14:33:06 +0100 Subject: [PATCH] Added error message in CP user form when someoen tries to add a user of type 'user' manually there. --- interface/web/admin/lib/lang/ar_users.lng | 1 + interface/web/admin/lib/lang/bg_users.lng | 1 + interface/web/admin/lib/lang/br_users.lng | 1 + interface/web/admin/lib/lang/ca_users.lng | 1 + interface/web/admin/lib/lang/cz_users.lng | 1 + interface/web/admin/lib/lang/de_users.lng | 1 + interface/web/admin/lib/lang/dk_users.lng | 1 + interface/web/admin/lib/lang/el_users.lng | 1 + interface/web/admin/lib/lang/en_users.lng | 1 + interface/web/admin/lib/lang/es_users.lng | 1 + interface/web/admin/lib/lang/fi_users.lng | 1 + interface/web/admin/lib/lang/fr_users.lng | 1 + interface/web/admin/lib/lang/hr_users.lng | 1 + interface/web/admin/lib/lang/hu_users.lng | 1 + interface/web/admin/lib/lang/id_users.lng | 1 + interface/web/admin/lib/lang/it_users.lng | 1 + interface/web/admin/lib/lang/ja_users.lng | 1 + interface/web/admin/lib/lang/nl_users.lng | 1 + interface/web/admin/lib/lang/pl_users.lng | 1 + interface/web/admin/lib/lang/pt_users.lng | 1 + interface/web/admin/lib/lang/ro_users.lng | 1 + interface/web/admin/lib/lang/ru_users.lng | 1 + interface/web/admin/lib/lang/se_users.lng | 1 + interface/web/admin/lib/lang/sk_users.lng | 1 + interface/web/admin/lib/lang/tr_users.lng | 1 + interface/web/admin/users_edit.php | 5 ++++- 26 files changed, 29 insertions(+), 1 deletion(-) diff --git a/interface/web/admin/lib/lang/ar_users.lng b/interface/web/admin/lib/lang/ar_users.lng index 93988a0911..1021d1ce4e 100644 --- a/interface/web/admin/lib/lang/ar_users.lng +++ b/interface/web/admin/lib/lang/ar_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/bg_users.lng b/interface/web/admin/lib/lang/bg_users.lng index 468e0ac218..d74fe0545d 100644 --- a/interface/web/admin/lib/lang/bg_users.lng +++ b/interface/web/admin/lib/lang/bg_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/br_users.lng b/interface/web/admin/lib/lang/br_users.lng index b1be5f6da7..6542472201 100644 --- a/interface/web/admin/lib/lang/br_users.lng +++ b/interface/web/admin/lib/lang/br_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'A senhas coincidem.'; $wb['username_error_collision'] = 'O nome do usuário não pode conter as palavras reservadas -web- ou -web- seguidas por um número.'; $wb['client_not_admin_err'] = 'Um usuário definido como cliente não pode ser configurado com o tipo: admin (administrador).'; $wb['lost_password_function_txt'] = 'Função reconfigurar senha perdida disponível'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/ca_users.lng b/interface/web/admin/lib/lang/ca_users.lng index 93988a0911..1021d1ce4e 100644 --- a/interface/web/admin/lib/lang/ca_users.lng +++ b/interface/web/admin/lib/lang/ca_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/cz_users.lng b/interface/web/admin/lib/lang/cz_users.lng index 443ff2ec82..13251e455f 100644 --- a/interface/web/admin/lib/lang/cz_users.lng +++ b/interface/web/admin/lib/lang/cz_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Hesla se shodují.'; $wb['username_error_collision'] = 'Uživatelské jméno nesmí být web nebo web a číslo.'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/de_users.lng b/interface/web/admin/lib/lang/de_users.lng index db37a605bc..77e8d3a8c0 100644 --- a/interface/web/admin/lib/lang/de_users.lng +++ b/interface/web/admin/lib/lang/de_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; $wb['username_error_collision'] = 'Der Benutzername darf nicht web oder web gefolgt von einer Zahl sein.'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Passwort vergessen Funktion steht zur Verfügung'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/dk_users.lng b/interface/web/admin/lib/lang/dk_users.lng index be8947ba20..9c6f754028 100644 --- a/interface/web/admin/lib/lang/dk_users.lng +++ b/interface/web/admin/lib/lang/dk_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Adgangskoderne stemmer overens.'; $wb['username_error_collision'] = 'Brugernavn må ikke være web eller web plus et tal.\\"'; $wb['client_not_admin_err'] = 'En bruger der hører til en klient kan ikke indstilles til typen: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/el_users.lng b/interface/web/admin/lib/lang/el_users.lng index 7351d6522a..92aed272aa 100644 --- a/interface/web/admin/lib/lang/el_users.lng +++ b/interface/web/admin/lib/lang/el_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/en_users.lng b/interface/web/admin/lib/lang/en_users.lng index 9c57f1db8b..d60ab796ca 100644 --- a/interface/web/admin/lib/lang/en_users.lng +++ b/interface/web/admin/lib/lang/en_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number."'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/es_users.lng b/interface/web/admin/lib/lang/es_users.lng index 1e3690b977..09e99a9288 100755 --- a/interface/web/admin/lib/lang/es_users.lng +++ b/interface/web/admin/lib/lang/es_users.lng @@ -32,4 +32,5 @@ $wb['username_error_collision'] = 'El nombre de usuario no puede ser el del web $wb['username_txt'] = 'Nombre de usuario'; $wb['username_unique'] = 'Ya existe un usuario con ese nombre de usuario.'; $wb['vorname_txt'] = 'Primer nombre'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/fi_users.lng b/interface/web/admin/lib/lang/fi_users.lng index 24968c8fd0..fb689821cb 100755 --- a/interface/web/admin/lib/lang/fi_users.lng +++ b/interface/web/admin/lib/lang/fi_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/fr_users.lng b/interface/web/admin/lib/lang/fr_users.lng index a20f0a6f0d..207cfd3c8a 100644 --- a/interface/web/admin/lib/lang/fr_users.lng +++ b/interface/web/admin/lib/lang/fr_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Les mots de passe correspondent.'; $wb['username_error_collision'] = 'Le nom d\'utilisateur ne peut pas commencer par web ou web suivi d\'un nombre.'; $wb['client_not_admin_err'] = 'Un utilisateur affilié à un client ne peut pas être changé en type admin'; $wb['lost_password_function_txt'] = 'La fonction mot de passe oublié est disponible'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/hr_users.lng b/interface/web/admin/lib/lang/hr_users.lng index 15e12a52f0..476bc044a3 100644 --- a/interface/web/admin/lib/lang/hr_users.lng +++ b/interface/web/admin/lib/lang/hr_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Šifre su identične.'; $wb['username_error_collision'] = 'Korisničko ime ne može biti web ili web sa brojem.\\"'; $wb['client_not_admin_err'] = 'Korisnik koji je u grupi klijenti ne može biti admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/hu_users.lng b/interface/web/admin/lib/lang/hu_users.lng index 126821da44..ef7dd99147 100644 --- a/interface/web/admin/lib/lang/hu_users.lng +++ b/interface/web/admin/lib/lang/hu_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/id_users.lng b/interface/web/admin/lib/lang/id_users.lng index 72641831d7..9b0f800801 100644 --- a/interface/web/admin/lib/lang/id_users.lng +++ b/interface/web/admin/lib/lang/id_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/it_users.lng b/interface/web/admin/lib/lang/it_users.lng index 4c819427b7..ece619def3 100644 --- a/interface/web/admin/lib/lang/it_users.lng +++ b/interface/web/admin/lib/lang/it_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Le password coincidono.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/ja_users.lng b/interface/web/admin/lib/lang/ja_users.lng index 7f16911b75..d0093e8dfd 100644 --- a/interface/web/admin/lib/lang/ja_users.lng +++ b/interface/web/admin/lib/lang/ja_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/nl_users.lng b/interface/web/admin/lib/lang/nl_users.lng index 9634ee4bd6..f26ee5ee50 100644 --- a/interface/web/admin/lib/lang/nl_users.lng +++ b/interface/web/admin/lib/lang/nl_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/pl_users.lng b/interface/web/admin/lib/lang/pl_users.lng index 8d227e08c3..ced9d6feae 100644 --- a/interface/web/admin/lib/lang/pl_users.lng +++ b/interface/web/admin/lib/lang/pl_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Hasła pasują'; $wb['username_error_collision'] = 'Nazwa użytkownika nie może być web lub web z numerem.'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/pt_users.lng b/interface/web/admin/lib/lang/pt_users.lng index f850711529..6e60bd63d1 100644 --- a/interface/web/admin/lib/lang/pt_users.lng +++ b/interface/web/admin/lib/lang/pt_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/ro_users.lng b/interface/web/admin/lib/lang/ro_users.lng index 93988a0911..1021d1ce4e 100644 --- a/interface/web/admin/lib/lang/ro_users.lng +++ b/interface/web/admin/lib/lang/ro_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/ru_users.lng b/interface/web/admin/lib/lang/ru_users.lng index 48b457002e..fb576efbbb 100644 --- a/interface/web/admin/lib/lang/ru_users.lng +++ b/interface/web/admin/lib/lang/ru_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Эти пароли совпадают.'; $wb['username_error_collision'] = 'Имя пользователя не может начинаться со слова "web" или "web" плюс число.'; $wb['client_not_admin_err'] = 'Пользователь, который принадлежит к клиенту не может быть установлен тип: admin'; $wb['lost_password_function_txt'] = 'Функция восстановления пароля доступна'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/se_users.lng b/interface/web/admin/lib/lang/se_users.lng index e7a5e4b8bd..d2ce0542d7 100644 --- a/interface/web/admin/lib/lang/se_users.lng +++ b/interface/web/admin/lib/lang/se_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Lösenorden matchar'; $wb['username_error_collision'] = 'Användarnamnet får inte vara web eller web och ett nummer'; $wb['client_not_admin_err'] = 'En användare som tillhör en kund kan inte sättas som admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/sk_users.lng b/interface/web/admin/lib/lang/sk_users.lng index 9ba84d433e..270260288f 100644 --- a/interface/web/admin/lib/lang/sk_users.lng +++ b/interface/web/admin/lib/lang/sk_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/lib/lang/tr_users.lng b/interface/web/admin/lib/lang/tr_users.lng index 5b1c1e8485..7eeb7eafad 100644 --- a/interface/web/admin/lib/lang/tr_users.lng +++ b/interface/web/admin/lib/lang/tr_users.lng @@ -32,4 +32,5 @@ $wb['password_match_txt'] = 'Parola ile onayı aynı.'; $wb['username_error_collision'] = 'Kullanıcı adı -web- ya da -web- sözcüğünü izleyen bir sayı ile başlayamaz.\\"'; $wb['client_not_admin_err'] = 'Bir müşteriye ait bir kullanıcının tipi admin olarak atanamaz'; $wb['lost_password_function_txt'] = 'Forgot password function is available'; +$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.'; ?> diff --git a/interface/web/admin/users_edit.php b/interface/web/admin/users_edit.php index e3919649b9..03134d2099 100644 --- a/interface/web/admin/users_edit.php +++ b/interface/web/admin/users_edit.php @@ -62,7 +62,10 @@ class page_action extends tform_actions { $app->tform->errorMessage .= $app->tform->wordbook['startmodule_err']; } - + //* Do not add users here + if(isset($this->dataRecord['typ']) && $this->dataRecord['typ'][0] == 'user') { + $app->tform->errorMessage .= $app->tform->wordbook['no_user_insert']; + } } -- GitLab