Bug 6328 follow-up, fixes Undefined subroutine &C4::Circulation::Delta_Days
[srvgit] / members / member-password.pl
index 03f5243..25e9551 100755 (executable)
@@ -90,7 +90,14 @@ if ( $newpassword  && ! $errormsg ) {
 $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'},
@@ -114,7 +121,6 @@ my $attributes = GetBorrowerAttributes($bor->{'borrowernumber'});
            destination => $destination,
                is_child        => ($bor->{'category_type'} eq 'C'),
            defaultnewpassword => $defaultnewpassword,
-       extendedattributes => $attributes,
        );