$template->param( adultborrower => 1 ) if ( $bor->{'category_type'} eq 'A' );
my ($picture, $dberror) = GetPatronImage($bor->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
-my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param( othernames => $bor->{'othernames'},
surname => $bor->{'surname'},
destination => $destination,
is_child => ($bor->{'category_type'} eq 'C'),
defaultnewpassword => $defaultnewpassword,
- extendedattributes => $attributes,
);