diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index 7bf250e829..deac903696 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -29,6 +29,7 @@ use C4::Circulation; use C4::Output; use C4::Dates qw/format_date/; use C4::Members; +use C4::Members::Attributes; use C4::Branch; my $query = new CGI; @@ -120,6 +121,14 @@ $borr->{'expiry'} = format_date( $borr->{'expiry'} ); $borr->{'dateofbirth'} = format_date( $borr->{'dateofbirth'} ); $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); +if (C4::Context->preference('ExtendedPatronAttributes')) { + my $attributes = C4::Members::Attributes::GetBorrowerAttributes($borrowernumber, 'opac'); + if (scalar(@$attributes) > 0) { + $borr->{ExtendedPatronAttributes} = 1; + $borr->{patron_attributes} = $attributes; + } +} + my @bordat; $bordat[0] = $borr;