| Summary: | C4::Auth_with_ldap::ldap_entry_2_hash inserts 0000-00-00 for invalid dateofbirth | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Dobrica Pavlinusic <dpavlin> |
| Component: | Authentication | Assignee: | Dobrica Pavlinusic <dpavlin> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | dpavlin, jonathan.druart, martin.renvoize |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17933 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36822 |
||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 31143 | ||
|
Description
Dobrica Pavlinusic
2017-01-30 15:56:37 UTC
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.
Seems good, but would it better to do dt_from_string on them to verify they are also valid? (In reply to Dobrica Pavlinusic from comment #2) > Seems good, but would it better to do dt_from_string on them to verify they > are also valid? It should not happen I think. If that happened, I guess some people would have raised this problem before. |