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];
$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;
}