From: Jeff Davis Date: Thu, 20 Aug 2020 17:54:34 +0000 (-0700) Subject: LP#1887196: fix PatronAPI dump X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e86cbd75534eab87443cdcdda5e9ed716ead53c8;p=evergreen%2Fpines.git LP#1887196: fix PatronAPI dump Signed-off-by: Jeff Davis Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/RemoteAuth/PatronAPI.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/RemoteAuth/PatronAPI.pm index 68c87022af..dfb8f05efe 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/RemoteAuth/PatronAPI.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/RemoteAuth/PatronAPI.pm @@ -109,7 +109,8 @@ sub success { my ($self, $user) = @_; my $template = $self->request_type; my $ctx = { - result => 'success' + result => 'success', + user => $user }; my $tt = new OpenILS::WWW::RemoteAuth::Template; return $tt->process($template, $ctx, $self->r); diff --git a/Open-ILS/src/templates/remoteauth/patronapi/dump.tt2 b/Open-ILS/src/templates/remoteauth/patronapi/dump.tt2 index 8d7550109c..8244a83715 100644 --- a/Open-ILS/src/templates/remoteauth/patronapi/dump.tt2 +++ b/Open-ILS/src/templates/remoteauth/patronapi/dump.tt2 @@ -1,11 +1,11 @@ -[%- USE date %] +[%- USE date -%] [%- IF ctx.result == 'success' %] -EXP DATE[p43]=[% date.format(ctx.user.expiry_date, '%m-%d-%y') %]
-P TYPE[p47]=[% ctx.user.profile %]
-HOME LIBR[p53]=[% ctx.user.home_ou %]
-P BARCODE[pb]=[% ctx.user.barcode %]
+EXP DATE[p43]=[% date.format(ctx.user.expire_date, '%m-%d-%y') %]
+P TYPE[p47]=[% ctx.user.profile.name %]
+HOME LIBR[p53]=[% ctx.user.home_ou.name %]
+P BARCODE[pb]=[% ctx.user.card.barcode %]
[%- ELSE %] ERRNUM=1
ERRMSG=Requested record not found