Bugzilla – Attachment 55058 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 - converted tabs to whitespace
bug-17215.patch (text/plain), 1.86 KB, created by
Lee Jamison
on 2016-08-31 12:49:28 UTC
(
hide
)
Description:
Bug 17215 - converted tabs to whitespace
Filename:
MIME Type:
Creator:
Lee Jamison
Created:
2016-08-31 12:49:28 UTC
Size:
1.86 KB
patch
obsolete
>From 5d2d98de068a11419310464f37b5f0562cfd622c Mon Sep 17 00:00:00 2001 >From: Lee Jamison <ldjamison@marywood.edu> >Date: Wed, 31 Aug 2016 08:26:43 -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. >--- > 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