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@lists.davical.org
http://lists.davical.org/listinfo/davical-dev
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@lists.davical.org
http://lists.davical.org/listinfo/davical-dev