Bugzilla – Attachment 55264 Details for
Bug 17215
Cardnumbers of patrons created using LDAP Replication not using autoMemberNum if configured
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17215 - Cardnumbers of patrons created using LDAP Replication not using autoMemberNum if configured
Bug-17215---Cardnumbers-of-patrons-created-using-L.patch (text/plain), 1.96 KB, created by
Kyle M Hall (khall)
on 2016-09-06 18:09:12 UTC
(
hide
)
Description:
Bug 17215 - Cardnumbers of patrons created using LDAP Replication not using autoMemberNum if configured
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-09-06 18:09:12 UTC
Size:
1.96 KB
patch
obsolete
>From 82a93600e09210afaab746138ff58a8f8679e12f Mon Sep 17 00:00:00 2001 >From: Lee Jamison <ldjamison@marywood.edu> >Date: Thu, 1 Sep 2016 09:19:27 -0400 >Subject: [PATCH] Bug 17215 - Cardnumbers of patrons created using LDAP > Replication not using autoMemberNum if configured > >To test: >1. Set the autoMemberNum System Preference to "Don't". >2. Login to the OPAC with an LDAP account that does not currently exist as a patron record. >3. Check the patron record's cardnumber. >4. the cardnumber should equal the patron's LDAP username. >5. Delete the patron record. >6. Apply the patch. >7. Set the autoMemberNum System Preference to "Do". >8. Login to the OPAC with an LDAP account that does not currently exist as a patron record. >9. Check the patron record's cardnumber. >10. The cardnumber should now be the next highest cardnumber based on autoMemberNum. > >Signed-off-by: Lee Jamison <ldjamison@marywood.edu> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Auth_with_ldap.pm | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 03e81e1..157dfe0 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -23,7 +23,7 @@ use Carp; > > use C4::Debug; > use C4::Context; >-use C4::Members qw(AddMember); >+use C4::Members qw(AddMember fixup_cardnumber); > use C4::Members::Attributes; > use C4::Members::AttributeTypes; > use C4::Members::Messaging; >@@ -238,7 +238,14 @@ sub checkpw_ldap { > # > sub ldap_entry_2_hash { > my $userldapentry = shift; >- my %borrower = ( cardnumber => shift ); >+ my $autonumber_members = C4::Context->boolean_preference('autoMemberNum') || 0; >+ my %borrower; >+ if($autonumber_members) { >+ $borrower{'cardnumber'} = fixup_cardnumber($borrower{'cardnumber'}); >+ } >+ else { >+ $borrower{'cardnumber'} = shift; >+ } > my %memberhash; > $userldapentry->exists('uid'); # This is bad, but required! By side-effect, this initializes the attrs hash. > if ($debug) { >-- >2.1.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 17215
:
54973
|
55048
|
55058
|
55092
| 55264