LP#1887196: fix PatronAPI dump
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 20 Aug 2020 17:54:34 +0000 (10:54 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 14 Sep 2020 15:23:20 +0000 (11:23 -0400)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/perlmods/lib/OpenILS/WWW/RemoteAuth/PatronAPI.pm
Open-ILS/src/templates/remoteauth/patronapi/dump.tt2

index 68c8702..dfb8f05 100644 (file)
@@ -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);
index 8d75501..8244a83 100644 (file)
@@ -1,11 +1,11 @@
-[%- USE date %]
+[%- USE date -%]
 <HTML>
 <BODY>
 [%- IF ctx.result == 'success' %]
-EXP DATE[p43]=[% date.format(ctx.user.expiry_date, '%m-%d-%y') %]<BR>
-P TYPE[p47]=[% ctx.user.profile %]<BR>
-HOME LIBR[p53]=[% ctx.user.home_ou %]<BR>
-P BARCODE[pb]=[% ctx.user.barcode %]<BR>
+EXP DATE[p43]=[% date.format(ctx.user.expire_date, '%m-%d-%y') %]<BR>
+P TYPE[p47]=[% ctx.user.profile.name %]<BR>
+HOME LIBR[p53]=[% ctx.user.home_ou.name %]<BR>
+P BARCODE[pb]=[% ctx.user.card.barcode %]<BR>
 [%- ELSE %]
 ERRNUM=1<BR>
 ERRMSG=Requested record not found<BR>