[open-ils-commits] r7679 -
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Aug 15 13:50:59 EDT 2007
Author: erickson
Date: 2007-08-15 13:47:04 -0400 (Wed, 15 Aug 2007)
New Revision: 7679
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
backporting barcode exists returns user id: svn merge -r7677:7678 svn://svn.open-ils.org/ILS/trunk
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2007-08-15 17:45:07 UTC (rev 7678)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2007-08-15 17:47:04 UTC (rev 7679)
@@ -2699,9 +2699,10 @@
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;
}
More information about the open-ils-commits
mailing list