From e86cbd75534eab87443cdcdda5e9ed716ead53c8 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Thu, 20 Aug 2020 10:54:34 -0700 Subject: [PATCH] LP#1887196: fix PatronAPI dump Signed-off-by: Jeff Davis Signed-off-by: Galen Charlton --- .../perlmods/lib/OpenILS/WWW/RemoteAuth/PatronAPI.pm | 3 ++- Open-ILS/src/templates/remoteauth/patronapi/dump.tt2 | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) 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
-- 2.43.2