From 0e9cbbba89b577462165f16c8aa1d4a0e65465e5 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Mon, 9 Feb 2026 11:52:05 +0200 Subject: [PATCH] Bug 41796: "Forgot your password" link is not visible if OpacResetPassword is enabled but OpacPasswordChange is disabled Before applying this patch, to reproduce the issue: 1. Set system preference OpacResetPassword to 'not allowed' 2. Set system preference OpacPasswordChange to 'Don't allow' 3. Set preference opacuserlogin to 'Allow' 4. Navigate to OPAC 5. Observe no "Forgot your password?" link on the OPAC main page 6. Set system preference OpacResetPassword to 'allowed' 7. Observe no "Forgot your password?" link on the OPAC main page 8. Set system preference OpacPasswordChange 'Allow' 9. Observe "Forgot your password?" link is present on the OPAC main page. Instead, it should be already present when OpacResetPassword is allowed. To test this patch: 1. Apply this patch 2. Set system preference OpacResetPassword to 'not allowed' 3. Set system preference OpacPasswordChange to 'Don't allow' 4. Set preference opacuserlogin to 'Allow' 5. Navigate to OPAC 6. Observe no "Forgot your password?" link on the OPAC main page 7. Set system preference OpacResetPassword to 'allowed' 8. Observe "Forgot your password?" link is present Signed-off-by: Bo Gustavsson Signed-off-by: Laura_Escamilla Signed-off-by: Lucas Gass (cherry picked from commit 4a366b4d5e60685837ca49d3899739060628a13e) Signed-off-by: Baptiste Wojtkowski --- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-reset-password.tt | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 25e5c23231..0d409e2f7e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -515,7 +515,7 @@ [% IF OpacLoginInstructions %]
[% PROCESS koha_news_block news => OpacLoginInstructions %]
[% END %] - [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt index 97d0995fb5..1e0ce17998 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -220,7 +220,7 @@ [% END %] [% IF Koha.Preference('EnableExpiredPasswordReset') %] Reset your password. - [% ELSIF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% ELSIF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] @@ -272,7 +272,7 @@

If you don't have a library card, stop by your local library to sign up.

[% END # / IF OpacLoginInstructions %] - [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index b682ee8ab9..b62a6ee218 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -209,7 +209,7 @@ [% IF ( OpacLoginInstructions ) %]
[% PROCESS koha_news_block news => OpacLoginInstructions %]
[% END %] - [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt index fbadc0fb1c..0adb5978a6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reset-password.tt @@ -104,7 +104,7 @@ - [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %] @@ -113,7 +113,7 @@ [% END # /IF Error_messages %] [% ELSE %]

Resetting your password has not been enabled by the library.

- [% IF Koha.Preference('OpacPasswordChange') && Categories.can_any_reset_password %] + [% IF Koha.Preference('OpacResetPassword') && Categories.can_any_reset_password %]