From 70987bafc4714fa1094e47ca873a7ec886b70612 Mon Sep 17 00:00:00 2001 From: Jacob O'Mara Date: Thu, 10 Apr 2025 12:32:14 +0100 Subject: [PATCH] Bug 40824: Show error for password history clash in opac-password-recovery.tt --- .../opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt | 2 ++ opac/opac-password-recovery.pl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt index 8d6f4003217..55d831ebe96 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt @@ -111,6 +111,8 @@
  • Password must contain at least one digit, one lowercase and one uppercase.
  • [% ELSIF password_has_whitespaces %]
  • Password must not contain leading or trailing whitespaces.
  • + [% ELSIF password_used_before %] +
  • This password has been used before. You cannot reuse any of your last [% password_history_count | html %] passwords.
  • [% ELSIF (errLinkNotValid) %] The link you clicked is either invalid, or expired.
    Be sure you used the link from the email, or contact library staff for assistance. diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl index 85841e93a24..e45f2d9015b 100755 --- a/opac/opac-password-recovery.pl +++ b/opac/opac-password-recovery.pl @@ -179,6 +179,8 @@ if ( $op eq 'cud-sendEmail' || $op eq 'cud-resendEmail' ) { $error = 'password_has_whitespaces'; } elsif ( $_->isa('Koha::Exceptions::Password::TooWeak') ) { $error = 'password_too_weak'; + } elsif ($_->isa('Koha::Exceptions::Password::UsedBefore')) { + $error = 'password_used_before'; } }; } -- 2.39.5