trouble writing to LDAP.... Undefined index: dn in /usr/local/horde/turba/lib/Driver/ldap.php on line 285
Steve Neuharth
steveneu@tiny.net
Wed, 5 Sep 2001 22:52:16 -0500
I've got turba working but I'd like to have the ability to add/modify
users in my LDAP source. I *THINK* I have everything set up right in
sources.php....
$cfgSources['localldap'] = array(
'title' => 'LocalDirectory',
'type' => 'ldap',
'params' => array(
'server' => '127.0.0.1',
'port' => 389,
'root' => 'dc=miniguys,dc=com',
'bind_dn' => 'cn=Manager,dc=xxx,dc=com',
'bind_password' => YOUWISH
),
'map' => array(
'__key' => 'dn',
'name' => 'cn',
'email' => 'mail',
'homeAddress' => 'postaladdress',
'homePhone' => 'homephone',
'workAddress' => 'workaddress',
'workPhone' => 'telephonenumber',
'cellPhone' => 'mobile',
'fax' => 'fax',
'title' => 'title',
'company' => 'company',
'notes' => 'description'
),
'public' => false,
'readonly' => false
);
but I keep getting the error...
httpd: PHP Warning: Undefined index: dn in
/usr/local/horde/turba/lib/Driver/ldap.php on line 285
accompanied by a blank screen in the browser....
here is the code that generates the error... tho' I'm not sure how it's
supposed to work (that's why I'm asking)
function makeKey($attributes)
{
$dn = '';
if (is_array($this->params['dn'])) {
foreach ($this->params['dn'] as $param) {
if (isset($attributes[$param])) {
$dn .= $param . '=' . $attributes[$param] . ',';
}
}
}
$dn .= $this->params['root'];
return $dn;
}