From fa6db2ef50723606eee015aa3f97cb574bf2bfca Mon Sep 17 00:00:00 2001 From: "klaus.doch" Date: Sun, 20 Feb 2022 18:14:31 +0100 Subject: [PATCH] Bug 29930: Auth with LDAP: Update tag leads to unwanted updates In the sub the userId was given, but the cardnumber was expected, therefore at every login the cardnumber changed to the userId. To test: 1. Login to the OPAC with an LDAP account that has a cardnumber which is different to the userId 2. Check the patron record's cardnumber. 3. The cardnumber should equal to the userId 4. Apply the patch. 5. Login to the OPAC with an LDAP account that has a cardnumber which is different to the userId 6. Check the patron record's cardnumber. 7. The cardnumber should be the same as before Signed-off-by: Alexander Wagner --- 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 f13dbdcf8e..edeb8b1208 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -206,7 +206,7 @@ sub checkpw_ldap { if (( $borrowernumber and $config{update} ) or (!$borrowernumber and $config{replicate}) ) { - %borrower = ldap_entry_2_hash($userldapentry,$userid); + %borrower = ldap_entry_2_hash($userldapentry,$cardnumber); #warn "checkpw_ldap received \%borrower w/ " . keys(%borrower), " keys: ", join(' ', keys %borrower), "\n"; } -- 2.30.2