From 7b9082a55bc92ec447f2c43fdd3efe61a8bfc84b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 24 Nov 2014 16:27:41 +0000 Subject: [PATCH] Bug 9165: (Followup) Clear existing sync A small enhancement to clear existing synced passowrd should this config option be enbled. This followup is related to bug 12831 http://bugs.koha-community.org/show_bug.cgi?id=9165 Signed-off-by: Robin Sheat Signed-off-by: Julian Maurice Signed-off-by: Tomas Cohen Arazi --- C4/Auth_with_ldap.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index 99c80c22d5..ba217fa09a 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -315,6 +315,9 @@ sub _do_changepassword { "Unable to access borrowernumber with userid=$userid, borrowernumber=$borrowerid" if !$sth->rows; my ($cardnum) = $sth->fetchrow; + my $sth = C4::Context->dbh->prepare( + 'UPDATE borrowers SET password = null WHERE borrowernumber=?'); + $sth->execute($borrowerid); return $cardnum; } my $digest = hash_password($password); -- 2.20.1