From f7463f23207a25542ec05a44617844a4d1e1d067 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 17 Oct 2014 18:30:34 +0200 Subject: [PATCH] Bug 13107 - Members are restricted even if the debarment is ended - opac-user This is the same issue as bug 12134. Test Plan: 1) Add a manual restriction to a patron with expiration date in the past. 2) Go on the OPAC and connect (opac-user.pl) 3) Note the warning message "Your account has been frozen until until XX/XX/XXXX ..." 4) Apply this patch 5) Repeat step 2 6) Note the warning message does not appear anymore Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Works as described. NOTE: If you set a debarment with date in the past in the GUI, there will be no entry in borrowers.debarred and you won't be able to see the problem. Set one with a date in the future and then alter the date in borrower_debarments and borrowers.debarred. Signed-off-by: Tomas Cohen Arazi --- opac/opac-user.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index aae78ece27..ad4f339e69 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -35,6 +35,7 @@ use C4::Items; use C4::Letters; use C4::Branch; # GetBranches use Koha::DateUtils; +use Koha::Borrower::Debarments qw(IsDebarred); use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; @@ -84,7 +85,7 @@ my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpir $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); -my $debar = $borr->{'debarred'}; +my $debar = IsDebarred($borrowernumber); my $userdebarred; if ($debar) { -- 2.39.5