+my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber});
+$template->param( %{$borrower} );
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}