[Koha-bugs] [Bug 18016] C4::Auth_with_ldap:: ldap_entry_2_hash inserts 0000-00-00 for invalid dateofbirth

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 31 10:09:18 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart at bugs.koha-c
                   |                            |ommunity.org

--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
I guess

diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm
index a58f4e6..8a69d97 100644
--- a/C4/Auth_with_ldap.pm
+++ b/C4/Auth_with_ldap.pm
@@ -350,6 +350,9 @@ sub update_local {
     my $borrowerid = shift or croak "No borrowerid";
     my $borrower   = shift or croak "No borrower record";

+    for my $field ( qw( dateofbirth dateenrolled dateexpiry debarred
sms_provider_id guarantorid ) ) {
+        delete $borrower->{$field} unless $borrower->{$field};
+    }
     my @keys = keys %$borrower;
     my $dbh = C4::Context->dbh;


Should fix this issue, but I am not able to test.
I am also wondering if it would not be better to call ModMember.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list