Bugzilla – Attachment 91305 Details for
Bug 20340
Ability to use authentication plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20340: Followup to allow OPAC login to complete
Bug-20340-Followup-to-allow-OPAC-login-to-complete.patch (text/plain), 1.71 KB, created by
Mark Tompsett
on 2019-07-05 02:26:32 UTC
(
hide
)
Description:
Bug 20340: Followup to allow OPAC login to complete
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2019-07-05 02:26:32 UTC
Size:
1.71 KB
patch
obsolete
>From 7fae2b98a9ceb278872851eaea3b37c35d6e7738 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 20 Mar 2018 04:03:44 +0000 >Subject: [PATCH] Bug 20340: Followup to allow OPAC login to complete > >The Plugin authenticates correctly, the problem is there >is no patron to match with, and so there is nothing to check >for authorization and user-details once a login is attempted. >This will at least let it fail gracefully. >--- > opac/opac-user.pl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 4ef0fb3c0b..20ad5bab8b 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -89,14 +89,15 @@ $template->param( shibbolethAuthentication => C4::Context->config('useshibboleth > > # get borrower information .... > my $patron = Koha::Patrons->find( $borrowernumber ); >-my $borr = $patron->unblessed; >+ >+my $borr = $patron ? $patron->unblessed : {}; > # unblessed is a hash vs. object/undef. Hence the use of curly braces here. > my $borcat = $borr ? $borr->{categorycode} : q{}; > > my ( $today_year, $today_month, $today_day) = Today(); > my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'}; > >-my $debar = Koha::Patrons->find( $borrowernumber )->is_debarred; >+my $debar = $patron ? $patron->is_debarred : undef; > my $userdebarred; > > if ($debar) { >@@ -119,7 +120,7 @@ if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) { > $canrenew = 0; > } > >-my $amountoutstanding = $patron->account->balance; >+my $amountoutstanding = $patron ? $patron->account->balance : 0; > my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); > $no_renewal_amt = undef unless looks_like_number( $no_renewal_amt ); > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20340
:
72469
|
73089
|
73098
|
73106
|
88470
|
88472
|
88473
|
88474
|
88475
|
88476
|
88477
|
88478
|
88487
|
88488
|
88511
|
88512
|
88518
|
88519
|
88520
|
88521
|
88522
|
88523
|
88526
|
88527
|
91304
| 91305 |
91306
|
91307