diff --git a/members/memberentry.pl b/members/memberentry.pl index 52035e8ef1..57a28eeb3a 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -229,7 +229,9 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) qr/^guarantor_surname$/, qr/^delete_guarantor$/, ); - push @keys_to_delete, map { qr/^$_$/ } split( /\s*\|\s*/, C4::Context->preference('BorrowerUnwantedField') || q{} ); + push @keys_to_delete, + map { qr/^$_$/ } + grep { $_ ne 'dateexpiry' } split( /\s*\|\s*/, C4::Context->preference('BorrowerUnwantedField') || q{} ); push @keys_to_delete, qr/^password_expiration_date$/ unless $CanUpdatePasswordExpiration; for my $regexp (@keys_to_delete) { for (keys %newdata) {