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)
committerKathy Lussier <klussier@masslnc.org>
Mon, 20 Feb 2017 23:54:37 +0000 (18:54 -0500)
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>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm

index 3b1a661..f2f5d8f 100644 (file)
@@ -302,6 +302,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).