From 9666a96d8ce326f4f886aa0c38ceda8b312765d8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 9 Aug 2025 15:19:02 +0200 Subject: [PATCH 1/2] FIX #34893 (#34897) * FIX #34893 * FIX change error code to USERNOTALLOWEDTOCHANGEPASS --- htdocs/user/passwordforgotten.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 2a711208e8b..93ba11c26c5 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -131,6 +131,15 @@ if (empty($reshook)) { $result = $edituser->fetch('', '', '', 1, $conf->entity, $username); } + // If the user does not have the right to change his own password + if ($result > 0) { + $edituser->getrights('user'); + if (!$edituser->hasRight('user', 'self', 'password')) { + $result = 0; + $edituser->error = 'USERNOTALLOWEDTOCHANGEPASS'; + } + } + // Set the message to show (must be the same if login/email exists or not // to avoid to guess them. $messagewarning = '
'; @@ -141,7 +150,7 @@ if (empty($reshook)) { } $messagewarning .= '
'; - if ($result <= 0 && $edituser->error == 'USERNOTFOUND') { + if ($result <= 0 && ($edituser->error == 'USERNOTFOUND' || $edituser->error == 'USERNOTALLOWEDTOCHANGEPASS')) { usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) $message .= $messagewarning; $username = ''; From 3362a6b06d8b212c78235a7ff5d3c2b06127677f Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Wed, 20 Aug 2025 19:03:18 +0200 Subject: [PATCH 2/2] FIX The combo of custom groups has disappeared (backport v19) (#35016) --- htdocs/accountancy/admin/categories.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 4ef7fe78726..014de28bcf3 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -135,6 +135,7 @@ $s = $formaccounting->select_accounting_category($cat_id, 'account_category', 1, if ($formaccounting->nbaccounts_category <= 0) { print ''.$s.''; } else { + print $s; print ''; } print '';