my $order = 'date_due desc';
my $limit = 0;
-my $issues = GetAllIssues($borrowernumber,$order,$limit);
+my $issues = ();
+# Do not request the old issues of anonymous patron
+if ( $borrowernumber eq C4::Context->preference('AnonymousPatron') ){
+ # use of 'eq' in the above comparison is intentional -- the
+ # system preference value could be blank
+ $template->param( is_anonymous => 1 );
+} else {
+ $issues = GetAllIssues($borrowernumber,$order,$limit);
+}
my $branches = GetBranches();
foreach my $issue ( @{$issues} ) {
}
-my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
+my ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'});
$template->param( picture => 1 ) if $picture;
if (C4::Context->preference('ExtendedPatronAttributes')) {