From ec92d9407e318e67951a64029d3952279891ffc3 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 13 Jul 2010 23:26:35 +0200 Subject: [PATCH] Bug 4994 - Net::LDAP returns lowercase names This requires us to specify all LDAP mappings in koha-conf.xml in lowercase, instead of original case used withing LDAP. Compare readability of (which doesn't work) with required (and non-intuitive) Signed-off-by: Chris Cormack Signed-off-by: Ian Walls (cherry picked from commit b79c4c88a965a3233f359f8333a492effcf075eb) Signed-off-by: Chris Nighswonger --- C4/Auth_with_ldap.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index 6ad17f756f..462ff07bd2 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -216,7 +216,7 @@ sub ldap_entry_2_hash ($$) { $debug and print STDERR "Finsihed \%memberhash has ", scalar(keys %memberhash), " keys\n", "Referencing \%mapping with ", scalar(keys %mapping), " keys\n"; foreach my $key (keys %mapping) { - my $data = $memberhash{$mapping{$key}->{is}}; + my $data = $memberhash{ lc($mapping{$key}->{is}) }; # Net::LDAP returns all names in lowercase $debug and printf STDERR "mapping %20s ==> %-20s (%s)\n", $key, $mapping{$key}->{is}, $data; unless (defined $data) { $data = $mapping{$key}->{content} || ''; # default or failsafe '' -- 2.39.5