From c38f9a7dacb08494f4f890a0075f6457c1683d7c Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Wed, 21 Dec 2022 17:12:58 -0500 Subject: [PATCH] Quipu Online Account Renewal - Fixes for Address Validation Signed-off-by: Terran McCanna --- .../src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 786a912dda..e433377295 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -37,7 +37,7 @@ sub prepare_extended_user_info { { flesh => 2, flesh_fields => { - au => [qw/card home_ou addresses ident_type locale billing_address waiver_entries stat_cat_entries/, @extra_flesh], + au => [qw/card home_ou addresses ident_type locale billing_address mailing_address waiver_entries stat_cat_entries/, @extra_flesh], "aou" => ["billing_address"], "actscecm" => ["stat_cat"] } @@ -121,16 +121,17 @@ sub load_myopac_prefs { my $user = $self->ctx->{user}; # PINES - check whether or not to provide account renewal link - if ($self->ctx->{user}->billing_address) { - $self->ctx->{valid_billing_address} = $self->ctx->{user}->billing_address->valid; + if ($user->billing_address and $user->billing_address->valid and $user->billing_address->valid eq 't') { + $self->ctx->{valid_billing_address} = 't'; } else { - $self->ctx->{valid_billing_address} = 0; + $self->ctx->{valid_billing_address} = 'f'; } - if ($self->ctx->{user}->mailing_address) { - $self->ctx->{valid_mailing_address} = $self->ctx->{user}->mailing_address->valid; + if ($user->mailing_address and $user->mailing_address->valid and $user->mailing_address->valid eq 't') { + $self->ctx->{valid_mailing_address} = 't'; } else { - $self->ctx->{valid_mailing_address} = 0; + $self->ctx->{valid_mailing_address} = 'f'; } + $self->check_account_exp(); my $lock_usernames = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.lock_usernames'); -- 2.11.0