Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo_data/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
3 changes: 2 additions & 1 deletion install/db_scripts/update_5_0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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;</step>
<step id="1670">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;</step>
ADD CONSTRAINT %PREFIX%_fk_ifo_inf FOREIGN KEY (ifo_inf_id) REFERENCES %PREFIX%_inventory_fields (inf_id) ON DELETE CASCADE ON UPDATE RESTRICT;</step>
<step id="1680">UPDATE %PREFIX%_texts SET txt_name = 'SYSMAIL_LOGIN_INFORMATION' WHERE txt_name = 'SYSMAIL_NEW_PASSWORD'</step>
<step>stop</step>
</update>
3 changes: 1 addition & 2 deletions languages/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
<string name="ORG_REGISTERED_USERS">Logged in user</string>
<string name="ORG_SEARCH_SIMILAR_NAMES">Search for similar names</string>
<string name="ORG_SEARCH_SIMILAR_NAMES_DESC">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)</string>
<string name="ORG_SEND_NEW_PASSWORD">Send new password</string>
<string name="ORG_SHOW_CREATE_EDIT">Show creator and timestamp of creation</string>
<string name="ORG_SHOW_CREATE_EDIT_DESC">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.</string>
<string name="ORG_TIME_FORMAT">Time format</string>
Expand Down Expand Up @@ -1597,7 +1596,7 @@
<string name="SYS_SWITCH_TO_RELATIONSHIP_CONFIGURATION">Switch to relationship configuration</string>
<string name="SYS_SWITCH_TO_ROOM_MANAGEMENT">Switch to room management</string>
<string name="SYS_SYMMETRICAL">Symmetrical</string>
<string name="SYS_SYSMAIL_NEW_PASSWORD">#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#</string>
<string name="SYS_SYSMAIL_LOGIN_INFORMATION">#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#</string>
<string name="SYS_SYSMAIL_PASSWORD_RESET">#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#</string>
<string name="SYS_SYSMAIL_REFUSE_REGISTRATION">#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#</string>
<string name="SYS_SYSMAIL_REGISTRATION_ADMINISTRATOR">#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.</string>
Expand Down
2 changes: 1 addition & 1 deletion modules/profile/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function formSubmitEvent(rolesAreaId = "") {
$value = '<a class="btn btn-secondary admidio-messagebox" href="javascript:void(0)" data-buttons="yes-no"
data-message="' . $gL10n->get('SYS_SEND_NEW_LOGIN', array($user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME'))) . '"
data-href="callUrlHideElement(\'no_element\', \'' . SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_MODULES . '/contacts/contacts_function.php', array('mode' => 'send_login', 'user_uuid' => $getUserUuid)) . '\', \'' . $gCurrentSession->getCsrfToken() . '\')">' .
'<i class="bi bi-key-fill"></i>' . $gL10n->get('ORG_SEND_NEW_PASSWORD') . '</a>';
'<i class="bi bi-key-fill"></i>' . $gL10n->get('SYS_SEND_LOGIN_INFORMATION') . '</a>';
} else {
// if user has no email or send email is disabled then administrator could set a new password
$value = '<a class="btn btn-secondary openPopup" href="javascript:void(0)" data-href="' . SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_MODULES . '/profile/password.php', array('user_uuid' => $getUserUuid)) . '">' .
Expand Down
2 changes: 1 addition & 1 deletion modules/profile/profile_new.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}, $getUserUuids);

if (empty($getUserUuids)) {
$getUserUuids = array(admFuncVariableIsValid($_GET, 'user_uuid', 'uuid', array('defaultValue' => '')));
$getUserUuids = array(admFuncVariableIsValid($_GET, 'user_uuid', 'uuid'));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/Entity/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']]);
Expand Down
2 changes: 1 addition & 1 deletion src/Organizations/Entity/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/UI/Presenter/PreferencesPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') . ':<br /><strong>#variable1#</strong> - ' . $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)
Expand Down
2 changes: 1 addition & 1 deletion src/Users/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']}
<div class="form-alert" style="display: none;">&nbsp;</div>
Expand Down