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

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

Return to bug 20340