From 263c21a427da1160833113edcd33e47c017530ff Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 15 Aug 2007 17:45:07 +0000 Subject: [PATCH] updated barcode exists method to return the user id instead of the card id git-svn-id: svn://svn.open-ils.org/ILS/trunk@7678 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 45660266f3..e69d47fda8 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -2726,9 +2726,10 @@ sub barcode_exists { my( $self, $conn, $auth, $barcode ) = @_; my $e = new_editor(authtoken=>$auth); return $e->event unless $e->checkauth; - my $a = $e->search_actor_card({barcode => $barcode}, {idlist=>1}); - return $$a[0] if $a and @$a; - return 0; + my $card = $e->search_actor_card({barcode => $barcode}); + return 0 unless @$card; + my $user = $e->retrieve_actor_user($card->[0]->usr) or return $e->event; + return $user->id; } -- 2.43.2