- my $data = GetMember('borrowernumber'=>$borrowernumber);
- my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
- $template->param( picture => 1 ) if $picture;
- $template->param( menu => 1,
- title => $data->{'title'},
- initials => $data->{'initials'},
- surname => $data->{'surname'},
- borrowernumber => $borrowernumber,
- firstname => $data->{'firstname'},
- cardnumber => $data->{'cardnumber'},
- categorycode => $data->{'categorycode'},
- categoryname => $data->{'description'},
- address => $data->{'address'},
- address2 => $data->{'address2'},
- city => $data->{'city'},
- state => $data->{'state'},
- zipcode => $data->{'zipcode'},
- phone => $data->{'phone'},
- phonepro => $data->{'phonepro'},
- email => $data->{'email'},
- branchcode => $data->{'branchcode'},
- branchname => GetBranchName($data->{'branchcode'}),
+ my $patron = Koha::Patrons->find( $borrowernumber );
+ my $circ_info = 1;
+ unless ( $patron ) {
+ $circ_info = 0;
+ }
+ if ( C4::Context->preference('ExtendedPatronAttributes') ) {
+ my $attributes = GetBorrowerAttributes( $borrowernumber );
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+ }
+
+ $template->param(
+ patron => $patron,
+ circulation => $circ_info,