[dev] [patch] Turba LDAP driver fix - edit ldap entry without
dn attribute
Ben Davis
ben.davis at pca-wichita.com
Fri Apr 2 11:22:27 PST 2004
Ben Davis wrote:
> Because it is possible that the user did not configure the values of
> $params['dn'] as turba attributes (for instance, if the user's
> $params['dn']=array('cn','uid'); and they don't have $attributes['cn']
> or $attributes['uid']), We need to make sure those entries exists in
> $attributes. I'm not sure about the best way to do this, though. I
> guess we could loop through $attributes and see if any of its keys
> match the values in $this->_params['dn'], otherwise we could just
> require that those values be entered in attributes.php.
>
> What do you think?
>
Just thought of a fairly clean solution:
// Check if we need to rename the object.
$intersect = array_intersect(array_keys($attributes), $this->_params['dn']);
if (count($intersect)==count($this->_params['dn']) && .....
new patch attached (diff against cvs from Apr 2, 2004 @ 13:15)
--BD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldap.php.diff
Type: text/x-patch
Size: 822 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20040402/394cb4af/ldap.php.bin
More information about the dev
mailing list