From dad78e0222d35454ae0b2e38e855b1ab49c1150b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 21 Feb 2012 11:47:34 -0500 Subject: [PATCH] TPac: avoid showing replaced addresses Replaced (negative-id) addresses should never be visible to the patron. Remove them from the collected list of addrs. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 4 ++++ 1 file changed, 4 insertions(+) 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 489594ce2f..fddb0edc0b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -34,6 +34,10 @@ sub prepare_extended_user_info { $e->rollback if $local_xact; + # discard replaced (negative-id) addresses. + $self->ctx->{user}->addresses([ + grep {$_->id > 0} @{$self->ctx->{user}->addresses} ]); + return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR unless $self->ctx->{user}; -- 2.11.0