From: Chris Sharp Date: Thu, 10 Jun 2021 13:18:12 +0000 (-0400) Subject: Quipu: check on full DOB, skip address checking X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ee38cedc4c590ff14cbc47b94adb510f4ac59baf;p=evergreen%2Fpines.git Quipu: check on full DOB, skip address checking --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm index bbef61de8b..f35c448246 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm @@ -595,7 +595,7 @@ sub check_dupes { my $search = { first_given_name => {value => $user->first_given_name, group => 0}, family_name => {value => $user->family_name, group => 0}, - dob => {value => substr($user->dob, 0, 4), group => 0} # birth year + dob => {value => $user->dob, group => 0} }; my $root_org = $e->search_actor_org_unit({parent_ou => undef})->[0]; @@ -614,44 +614,44 @@ sub check_dupes { $logger->info("ECARD found potential duplicate patrons: @$ids"); - if (my $streetname = $self->cgi->param('physical_street1_name')) { - # We found matching patrons. Perform a secondary check on the - # address street name only. - - $logger->info("ECARD secondary search on street name: $streetname"); - - my $addr_ids = $e->search_actor_user_address( - { usr => $ids, - street1 => {'~*' => "(^| )$streetname( |\$)"} - }, {idlist => 1} - ); - - if (@$addr_ids) { - # we don't really care what patrons match at this point, - # only whether a match is found. - $ids = [1]; - $logger->info("ECARD secondary address check match(es) ". - "found on address(es) @$addr_ids"); - - } else { - $ids = []; - $logger->info( - "ECARD secondary address check found no matches"); - } - - } else { - $ids = []; - # unclear if this is a possibility -- err on the side of allowing - # the registration. - $logger->info("ECARD found possible patron match but skipping ". - "secondary street name check -- no street name was provided"); - } - - return 1 if @$ids == 0; +# if (my $streetname = $self->cgi->param('physical_street1_name')) { +# # We found matching patrons. Perform a secondary check on the +# # address street name only. +# +# $logger->info("ECARD secondary search on street name: $streetname"); +# +# my $addr_ids = $e->search_actor_user_address( +# { usr => $ids, +# street1 => {'~*' => "(^| )$streetname( |\$)"} +# }, {idlist => 1} +# ); +# +# if (@$addr_ids) { +# # we don't really care what patrons match at this point, +# # only whether a match is found. +# $ids = [1]; +# $logger->info("ECARD secondary address check match(es) ". +# "found on address(es) @$addr_ids"); +# +# } else { +# $ids = []; +# $logger->info( +# "ECARD secondary address check found no matches"); +# } +# +# } else { +# $ids = []; +# # unclear if this is a possibility -- err on the side of allowing +# # the registration. +# $logger->info("ECARD found possible patron match but skipping ". +# "secondary street name check -- no street name was provided"); +# } +# +# return 1 if @$ids == 0; $ctx->{response}->{status} = 'DUPLICATE'; $ctx->{response}->{messages} = ['first_given_name', - 'family_name', 'dob_year', 'billing_street1_name']; + 'family_name', 'dob']; return undef; }