From 120f578698e28e921d029a6b8749eab44b4c8d8a Mon Sep 17 00:00:00 2001 From: Marcel Folaron Date: Tue, 26 Nov 2024 13:01:57 -0500 Subject: [PATCH] Fix missing value submission for notifications checkbox #2818 --- app/Domain/Users/Controllers/EditOwn.php | 3 +- app/Domain/Users/Templates/editOwn.blade.php | 2 +- app/Domain/Users/Templates/editOwn.tpl.php | 413 ------------------- 3 files changed, 3 insertions(+), 415 deletions(-) delete mode 100644 app/Domain/Users/Templates/editOwn.tpl.php diff --git a/app/Domain/Users/Controllers/EditOwn.php b/app/Domain/Users/Controllers/EditOwn.php index 7739deceaf..e862e4edf4 100644 --- a/app/Domain/Users/Controllers/EditOwn.php +++ b/app/Domain/Users/Controllers/EditOwn.php @@ -202,6 +202,7 @@ public function post(): Response ]; if (password_verify($_POST['currentPassword'], $values['password'])) { + if ($_POST['newPassword'] == $_POST['confirmPassword']) { if ($this->userService->checkPasswordStrength($_POST['newPassword'])) { $values['password'] = $_POST['newPassword']; @@ -307,7 +308,7 @@ public function post(): Response $this->userRepo->editOwn($values, $this->userId); // Storing option messagefrequency - $this->settingsService->saveSetting('usersettings.'.$this->userId.'.messageFrequency', (int) $_POST['messagesfrequency']); + $this->settingsService->saveSetting('usersettings.'.$this->userId.'.messageFrequency', (int) $_POST['messagesfrequency'] ?? 3600); $this->tpl->setNotification($this->language->__('notifications.changed_profile_settings_successfully'), 'success', 'profilesettings_updated'); } diff --git a/app/Domain/Users/Templates/editOwn.blade.php b/app/Domain/Users/Templates/editOwn.blade.php index 2f2ed9b192..65bb61adae 100644 --- a/app/Domain/Users/Templates/editOwn.blade.php +++ b/app/Domain/Users/Templates/editOwn.blade.php @@ -288,7 +288,7 @@
- $val) { - $$var = $val; // necessary for blade refactor -} -$roles = $tpl->get('roles'); -$values = $tpl->get('values'); -$user = $tpl->get('user'); -?> - - - - -displayNotification(); ?> - -
-
-
-
-
- - - -
-
- - -
-
- - - - value="e($values['firstname']) ?>"/>
-
-
- -
- - - - value="e($values['lastname']) ?>"/>
-
-
- -
- - - - value="e($values['user']) ?>"/>
-
-
- -
- - - - value="e($values['phone']) ?>"/>
-
-
- -
-

- - - -

- -
-
- -
-

- __('headlines.change_password'); ?> -

- '.$tpl->__('text.account_managed_ldap').'

'; - } ?> -
- -
-
- - - - id="currentPassword"/>
-
-
- -
- - - - id="newPassword"/> - - - -
- -
- - - - id="confirmPassword"/>
- - __('label.passwordRequirements') ?> - -
- -
-
- - - - -
-

-

- __('headlines.twoFA'); ?> -

- -

__('text.twoFA_enabled'); ?>

- -

__('text.twoFA_disabled'); ?>

- -

__('text.twoFA_manage'); ?>

-
- -
-
- -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - -
-
- -
-
- -
-
- - - - - -
-
-
- - -
-
-
-
-
- - get('availableFonts') as $key => $font) { ?> -
- - - get('themeFont') == $key) { - echo "checked='checked'"; - } ?>/> - -
- - -
-
-
-
-
- - get('availableColorSchemes') as $key => $scheme) { ?> -
- - - get('userColorScheme') == $key) { - echo "checked='checked'"; - } ?>/> - -
- - -
-
-
- - -
-
- -
-
- -
-
- - - />
-
-
-
- - -
-
-
-
- - -
-
-
-
-
-
-
- ?v=timestamp() ?>' class='profileImg' alt='Profile Picture' id="previousImage"/> -
-
- -
- - - -
- -
-
- - -
- - __('buttons.select_file') ?> - __('buttons.change') ?> - - - - __('buttons.remove') ?> -
-

- - __('buttons.save') ?> - - - - -

-
-
-
-
-
-
- - -