Bugzilla – Attachment 13538 Details for
Bug 9109
Authenticate on userid as well as cardnumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9109 - Authenticate on userid as well as cardnumber
0001-Bug-9109-Authenticate-on-userid-as-well-as-cardnumbe.patch (text/plain), 1.47 KB, created by
David Cook
on 2012-11-19 20:50:39 UTC
(
hide
)
Description:
Bug 9109 - Authenticate on userid as well as cardnumber
Filename:
MIME Type:
Creator:
David Cook
Created:
2012-11-19 20:50:39 UTC
Size:
1.47 KB
patch
obsolete
>From b1a649e8ba578ad36c7014d44254c8ee44fc2d62 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 20 Nov 2012 07:46:13 +1100 >Subject: [PATCH] Bug 9109 - Authenticate on userid as well as cardnumbe >Content-Type: text/plain; charset="utf-8" > >Apparently, SIP currently only uses cardnumber to authenticate Koha patrons. > >This patch introduces a check for userid when authenticating, if the cardnumber isn't found. >--- > C4/SIP/ILS/Patron.pm | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index d3a9762..13c4c7b 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -37,13 +37,18 @@ sub new { > my ($class, $patron_id) = @_; > my $type = ref($class) || $class; > my $self; >+ #check both cardnumber and userid > $kp = GetMember(cardnumber=>$patron_id); >+ if (defined $kp) { >+ } else { >+ $kp = GetMember(userid=>$patron_id); >+ } > $debug and warn "new Patron (GetMember): " . Dumper($kp); > unless (defined $kp) { > syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id); > return; > } >- $kp = GetMemberDetails(undef,$patron_id); >+ $kp = GetMemberDetails($kp->{'borrowernumber'}); > $debug and warn "new Patron (GetMemberDetails): " . Dumper($kp); > my $pw = $kp->{password}; ### FIXME - md5hash -- deal with . > my $flags = $kp->{flags}; # or warn "Warning: No flags from patron object for '$patron_id'"; >-- >1.7.7.4 >
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 9109
: 13538