Quipu: check on full DOB, skip address checking
authorChris Sharp <csharp@georgialibraries.org>
Thu, 10 Jun 2021 13:18:12 +0000 (09:18 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 2 Jul 2021 15:13:10 +0000 (11:13 -0400)
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Ecard.pm

index bbef61d..f35c448 100644 (file)
@@ -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;
 }