LP#1541559: make active barcode available in OPAC
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 3 Oct 2016 20:39:37 +0000 (13:39 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 7 Feb 2017 23:45:35 +0000 (15:45 -0800)
When logged in to the TPAC, the barcode of the patron's active card is
made available in $ctx->{active_card}.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm

index c5b2840..8a02a45 100644 (file)
@@ -300,6 +300,7 @@ sub load_common {
             $ctx->{authtoken} = $e->authtoken;
             $ctx->{authtime} = $e->authtime;
             $ctx->{user} = $e->requestor;
+            $ctx->{active_card} = $self->editor->retrieve_actor_card($ctx->{user}->card)->barcode;
             $ctx->{place_unfillable} = 1 if $e->requestor->wsid && $e->allowed('PLACE_UNFILLABLE_HOLD', $e->requestor->ws_ou);
 
             # The browser client does not set an OILS-Wrapper header (above).