From 5fa865cb356d7540cc0fc770dd70e4f336b80080 Mon Sep 17 00:00:00 2001 From: Jacob O'Mara Date: Thu, 10 Apr 2025 12:30:24 +0100 Subject: [PATCH] Bug 40824: Add "password has been used before" exception --- Koha/Exceptions/Password.pm | 5 ++++- Koha/Exceptions/Password/UsedBefore.pm | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Koha/Exceptions/Password/UsedBefore.pm diff --git a/Koha/Exceptions/Password.pm b/Koha/Exceptions/Password.pm index b3d323f404d..a2f536726a7 100644 --- a/Koha/Exceptions/Password.pm +++ b/Koha/Exceptions/Password.pm @@ -48,7 +48,10 @@ use Exception::Class ( 'Koha::Exceptions::Password::NoCategoryProvided' => { isa => 'Koha::Exceptions::Password', description => 'You must provide a patron\'s category to validate password\'s strength and length' - } + }, + 'Koha::Exceptions::Password::UsedBefore' => { + isa => 'Koha::Exceptions::Password', + }, ); sub full_message { diff --git a/Koha/Exceptions/Password/UsedBefore.pm b/Koha/Exceptions/Password/UsedBefore.pm new file mode 100644 index 00000000000..888361a0e01 --- /dev/null +++ b/Koha/Exceptions/Password/UsedBefore.pm @@ -0,0 +1,12 @@ +package Koha::Exceptions::Password::UsedBefore; + +use Modern::Perl; + +use Exception::Class ( + 'Koha::Exceptions::Password::UsedBefore' => { + isa => 'Koha::Exceptions::Exception', + description => 'Password has been used before', + }, +); + +1; \ No newline at end of file -- 2.39.5