View | Details | Raw Unified | Return to bug 20340
Collapse All | Expand All

(-)a/opac/opac-user.pl (-5 / +4 lines)
Lines 89-102 $template->param( shibbolethAuthentication => C4::Context->config('useshibboleth Link Here
89
89
90
# get borrower information ....
90
# get borrower information ....
91
my $patron = Koha::Patrons->find( $borrowernumber );
91
my $patron = Koha::Patrons->find( $borrowernumber );
92
my $borr = $patron->unblessed;
92
93
# unblessed is a hash vs. object/undef. Hence the use of curly braces here.
93
my $borr = $patron ? $patron->unblessed : {};
94
my $borcat = $borr ? $borr->{categorycode} : q{};
94
my $borcat = $borr ? $borr->{categorycode} : q{};
95
95
96
my (  $today_year,   $today_month,   $today_day) = Today();
96
my (  $today_year,   $today_month,   $today_day) = Today();
97
my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'};
97
my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'};
98
98
99
my $debar = Koha::Patrons->find( $borrowernumber )->is_debarred;
99
my $debar = $patron ? $patron->is_debarred : undef;
100
my $userdebarred;
100
my $userdebarred;
101
101
102
if ($debar) {
102
if ($debar) {
Lines 119-125 if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) { Link Here
119
    $canrenew = 0;
119
    $canrenew = 0;
120
}
120
}
121
121
122
my $amountoutstanding = $patron->account->balance;
122
my $amountoutstanding = $patron ? $patron->account->balance : 0;
123
if ( $amountoutstanding > 5 ) {
123
if ( $amountoutstanding > 5 ) {
124
    $borr->{'amountoverfive'} = 1;
124
    $borr->{'amountoverfive'} = 1;
125
}
125
}
126
- 

Return to bug 20340