Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DAViCal: Dev
LDAP Sync
 

Index | Next | Previous | View Flat


elm at skweez

Sep 14, 2011, 6:36 AM


Views: 490
Permalink
LDAP Sync

Hey,

I did a fresh install of Davical 0.9.9.5 today but the LDAP sync is not working. It gives me the following error:

Exception [0] Principal::Create: Mandatory field "username" is not set.
At line 521 of /usr/share/davical/inc/Principal.php
================= Stack Trace ===================
/usr/share/davical/htdocs/tools.php[24] sync_LDAP()
/usr/share/davical/inc/drivers_ldap.php[544] sync_user_from_LDAP()
/usr/share/davical/inc/drivers_ldap.php[284] Principal->Create()
/usr/share/davical/inc/Principal.php[544] Principal->Write()

I think the problem is in Principal.php in Line 514:

$sql_params[':'.$k] = $field_values->{$k};

You only search for the values in field_values, but the username and other are found in the object itself ($this->{$k}). You might want to use something like:

$sql_params[':'.$k] = isset($field_values->{$k}) ? $field_values->{$k} : $this->{$k};

This works for me…

Greetz
_______________________________________________
DAViCal-dev mailing list
DAViCal-dev [at] lists
http://lists.davical.org/listinfo/davical-dev

Subject User Time
LDAP Sync elm at skweez Sep 14, 2011, 6:36 AM
    Re: LDAP Sync andrew at morphoss Sep 15, 2011, 2:28 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.