diff --git a/demo_data/data.sql b/demo_data/data.sql index ac03975234..5fb527305f 100644 --- a/demo_data/data.sql +++ b/demo_data/data.sql @@ -1191,13 +1191,13 @@ INSERT INTO %PREFIX%_sessions (ses_id, ses_usr_id, ses_org_id, ses_session_id, s INSERT INTO %PREFIX%_texts (txt_id, txt_org_id, txt_name, txt_text) VALUES (1, 1, 'SYSMAIL_REGISTRATION_APPROVED', 'SYS_SYSMAIL_REGISTRATION_USER'), (2, 1, 'SYSMAIL_REGISTRATION_NEW', 'SYS_SYSMAIL_REGISTRATION_ADMINISTRATOR'), -(3, 1, 'SYSMAIL_NEW_PASSWORD', 'SYS_SYSMAIL_NEW_PASSWORD'), +(3, 1, 'SYSMAIL_NEW_PASSWORD', 'SYS_SYSMAIL_LOGIN_INFORMATION'), (4, 1, 'SYSMAIL_PASSWORD_RESET', 'SYS_SYSMAIL_PASSWORD_RESET'), (5, 1, 'SYSMAIL_REGISTRATION_REFUSED', 'SYS_SYSMAIL_REFUSE_REGISTRATION'), (6, 1, 'SYSMAIL_REGISTRATION_CONFIRMATION', 'SYS_SYSMAIL_REGISTRATION_CONFIRMATION'), (101, 2, 'SYSMAIL_REGISTRATION_APPROVED', 'SYS_SYSMAIL_REGISTRATION_USER'), (102, 2, 'SYSMAIL_REGISTRATION_NEW', 'SYS_SYSMAIL_REGISTRATION_ADMINISTRATOR'), -(103, 2, 'SYSMAIL_NEW_PASSWORD', 'SYS_SYSMAIL_NEW_PASSWORD'), +(103, 2, 'SYSMAIL_NEW_PASSWORD', 'SYS_SYSMAIL_LOGIN_INFORMATION'), (104, 2, 'SYSMAIL_PASSWORD_RESET', 'SYS_SYSMAIL_PASSWORD_RESET'), (105, 2, 'SYSMAIL_REGISTRATION_REFUSED', 'SYS_SYSMAIL_REFUSE_REGISTRATION'), (106, 2, 'SYSMAIL_REGISTRATION_CONFIRMATION', 'SYS_SYSMAIL_REGISTRATION_CONFIRMATION'); diff --git a/install/db_scripts/update_5_0.xml b/install/db_scripts/update_5_0.xml index 5dd0867508..6aa81a6e3d 100644 --- a/install/db_scripts/update_5_0.xml +++ b/install/db_scripts/update_5_0.xml @@ -501,6 +501,7 @@ WHERE usf_fn.usf_name_intern = 'FIRST_NAME' AND usf_ln.usf_name_intern = 'LAST_N DEFAULT character SET = utf8 COLLATE = utf8_unicode_ci; ALTER TABLE %PREFIX%_inventory_field_select_options - ADD CONSTRAINT %PREFIX%_fk_ifo_inf FOREIGN KEY (ifo_inf_id) REFERENCES %PREFIX%_inventory_fields (inf_id) ON DELETE CASCADE ON UPDATE RESTRICT; + ADD CONSTRAINT %PREFIX%_fk_ifo_inf FOREIGN KEY (ifo_inf_id) REFERENCES %PREFIX%_inventory_fields (inf_id) ON DELETE CASCADE ON UPDATE RESTRICT; + UPDATE %PREFIX%_texts SET txt_name = 'SYSMAIL_LOGIN_INFORMATION' WHERE txt_name = 'SYSMAIL_NEW_PASSWORD' stop diff --git a/languages/en.xml b/languages/en.xml index fbc41d1a82..2146a4b519 100644 --- a/languages/en.xml +++ b/languages/en.xml @@ -178,7 +178,6 @@ Logged in user Search for similar names At registration and assigning registrations Admidio is searching for similar surnames and first names in order to avoid double entries. Deactivation results search for identical names only. (default: yes) - Send new password Show creator and timestamp of creation In some places the creator and the user with the last change to a record is displayed together with a timestamp. This setting can be used to determine whether this information is displayed at all and whether the user should be displayed with the user name or with their first and last name. Time format @@ -1597,7 +1596,7 @@ Switch to relationship configuration Switch to room management Symmetrical - #subject# Login data for #organization_long_name#\n#content# Hello #user_first_name#,\n\nYou receive your login data for the website #organization_homepage#.\nUsername: #user_login_name#\nPassword: #variable1#\n\nThe password was generated automatically,\nYou should change it after logging in to #organization_homepage# in your profile.\n\nRegards,\nThe team of #organization_long_name# + #subject# Login data for #organization_long_name#\n#content# Hello #user_first_name#,\n\nYou receive your login data for the website #organization_homepage#.\nUsername: #user_login_name#\nPassword: #variable1#\n\nThe password was generated automatically,\nYou should change it after logging in to #organization_homepage# in your profile.\n\nRegards,\nThe team of #organization_long_name# #subject# Reset password for #organization_long_name#\n#content# Hello #user_first_name#,\n\nWe have received a request to reset your password on #organization_homepage#.\n\nIf the request came from you, you can use the following link to reset your password and set a new one: \n#variable1#\n\nRegards,\nThe team of #organization_long_name# #subject# in registration at #organization_long_name# rejected.\n#content#Hello #user_first_name#,\n\nyour registration at #organization_homepage# was rejected.\n\nRegistrations are accepted in general by our users. If you are a member and your registration was still rejected, it may be because you were not identified as member.\nTo clarify the reasons for the rejection please contact the administrator #administrator_email# from #organization_homepage#.\n\nRegards,\nThe team of #organization_long_name# #subject# New registration at #organization_long_name# website\n#content# A new user has registered on #organization_homepage#.\n\nSurname: #user_last_name#\nFirst Name: #user_first_name#\nE-Mail: #user_email#\n\n\nThis message was generated automatically. diff --git a/modules/profile/profile.php b/modules/profile/profile.php index ec5afc3d18..e0c46296c3 100644 --- a/modules/profile/profile.php +++ b/modules/profile/profile.php @@ -299,7 +299,7 @@ function formSubmitEvent(rolesAreaId = "") { $value = '' . - '' . $gL10n->get('ORG_SEND_NEW_PASSWORD') . ''; + '' . $gL10n->get('SYS_SEND_LOGIN_INFORMATION') . ''; } else { // if user has no email or send email is disabled then administrator could set a new password $value = '' . diff --git a/modules/profile/profile_new.php b/modules/profile/profile_new.php index ed2fe6c73b..ffbe08445c 100644 --- a/modules/profile/profile_new.php +++ b/modules/profile/profile_new.php @@ -45,7 +45,7 @@ }, $getUserUuids); if (empty($getUserUuids)) { - $getUserUuids = array(admFuncVariableIsValid($_GET, 'user_uuid', 'uuid', array('defaultValue' => ''))); + $getUserUuids = array(admFuncVariableIsValid($_GET, 'user_uuid', 'uuid')); } } diff --git a/src/Infrastructure/Entity/Text.php b/src/Infrastructure/Entity/Text.php index d5e8cb3dc8..6a2990c3ed 100644 --- a/src/Infrastructure/Entity/Text.php +++ b/src/Infrastructure/Entity/Text.php @@ -98,7 +98,7 @@ public function readableName(): string 'SYSMAIL_REGISTRATION_NEW' => 'SYS_NOTIFICATION_NEW_REGISTRATION', 'SYSMAIL_REGISTRATION_APPROVED' => 'SYS_NOTIFICATION_REGISTRATION_APPROVAL', 'SYSMAIL_REGISTRATION_REFUSED' => 'ORG_REFUSE_REGISTRATION', - 'SYSMAIL_NEW_PASSWORD' => 'ORG_SEND_NEW_PASSWORD', + 'SYSMAIL_LOGIN_INFORMATION' => 'SYS_SEND_LOGIN_INFORMATION', 'SYSMAIL_PASSWORD_RESET' => 'SYS_PASSWORD_FORGOTTEN', ); // $textLabel = Language::translateIfTranslationStrId($textLabels[$row['name']]); diff --git a/src/Organizations/Entity/Organization.php b/src/Organizations/Entity/Organization.php index a9525416a5..f8e5a0693c 100644 --- a/src/Organizations/Entity/Organization.php +++ b/src/Organizations/Entity/Organization.php @@ -140,7 +140,7 @@ public function createBasicData(int $userId) 'SYSMAIL_REGISTRATION_NEW' => $gL10n->get('SYS_SYSMAIL_REGISTRATION_ADMINISTRATOR'), 'SYSMAIL_REGISTRATION_APPROVED' => $gL10n->get('SYS_SYSMAIL_REGISTRATION_USER'), 'SYSMAIL_REGISTRATION_REFUSED' => $gL10n->get('SYS_SYSMAIL_REFUSE_REGISTRATION'), - 'SYSMAIL_NEW_PASSWORD' => $gL10n->get('SYS_SYSMAIL_NEW_PASSWORD'), + 'SYSMAIL_LOGIN_INFORMATION' => $gL10n->get('SYS_SYSMAIL_LOGIN_INFORMATION'), 'SYSMAIL_PASSWORD_RESET' => $gL10n->get('SYS_SYSMAIL_PASSWORD_RESET') ); $text = new Text($this->db); diff --git a/src/UI/Presenter/PreferencesPresenter.php b/src/UI/Presenter/PreferencesPresenter.php index c2a500edb8..9e274ab218 100644 --- a/src/UI/Presenter/PreferencesPresenter.php +++ b/src/UI/Presenter/PreferencesPresenter.php @@ -2495,11 +2495,11 @@ public function createSystemNotificationsForm(): string $formSystemNotifications->addMultilineTextInput('SYSMAIL_REGISTRATION_APPROVED', $gL10n->get('SYS_NOTIFICATION_REGISTRATION_APPROVAL'), $text->getValue('txt_text'), 7); $text->readDataByColumns(array('txt_name' => 'SYSMAIL_REGISTRATION_REFUSED', 'txt_org_id' => $gCurrentOrgId)); $formSystemNotifications->addMultilineTextInput('SYSMAIL_REGISTRATION_REFUSED', $gL10n->get('ORG_REFUSE_REGISTRATION'), $text->getValue('txt_text'), 7); - $text->readDataByColumns(array('txt_name' => 'SYSMAIL_NEW_PASSWORD', 'txt_org_id' => $gCurrentOrgId)); + $text->readDataByColumns(array('txt_name' => 'SYSMAIL_LOGIN_INFORMATION', 'txt_org_id' => $gCurrentOrgId)); $htmlDesc = $gL10n->get('ORG_ADDITIONAL_VARIABLES') . ':
#variable1# - ' . $gL10n->get('ORG_VARIABLE_NEW_PASSWORD'); $formSystemNotifications->addMultilineTextInput( - 'SYSMAIL_NEW_PASSWORD', - $gL10n->get('ORG_SEND_NEW_PASSWORD'), + 'SYSMAIL_LOGIN_INFORMATION', + $gL10n->get('SYS_SEND_LOGIN_INFORMATION'), $text->getValue('txt_text'), 7, array('helpTextId' => $htmlDesc) diff --git a/src/Users/Entity/User.php b/src/Users/Entity/User.php index 4b68e719b6..04f5eb2923 100644 --- a/src/Users/Entity/User.php +++ b/src/Users/Entity/User.php @@ -1946,7 +1946,7 @@ public function sendNewPassword() $sysMail = new SystemMail($this->db); $sysMail->addRecipientsByUser($this->getValue('usr_uuid')); $sysMail->setVariable(1, $password); - $sysMail->sendSystemMail('SYSMAIL_NEW_PASSWORD', $this); + $sysMail->sendSystemMail('SYSMAIL_LOGIN_INFORMATION', $this); } else { throw new Exception('SYS_NO_RIGHTS'); } diff --git a/themes/simple/templates/preferences/preferences.system-notifications.tpl b/themes/simple/templates/preferences/preferences.system-notifications.tpl index b935bd8739..8a27d38be7 100644 --- a/themes/simple/templates/preferences/preferences.system-notifications.tpl +++ b/themes/simple/templates/preferences/preferences.system-notifications.tpl @@ -31,7 +31,7 @@ {include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_REGISTRATION_NEW']} {include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_REGISTRATION_APPROVED']} {include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_REGISTRATION_REFUSED']} - {include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_NEW_PASSWORD']} + {include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_LOGIN_INFORMATION']} {include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_PASSWORD_RESET']} {include 'sys-template-parts/form.button.tpl' data=$elements['adm_button_save_system_notification']}