[turba] [api] getContact

Jan Schneider jan at horde.org
Thu Oct 30 16:55:21 UTC 2008

Zitat von Jonah Dekeyzer <jonah at menzz.be>:

> Hello,
> I have a problem using the api to get a contact.
> Turba 2.2.1 with ldap backend
> when I use
> $registry->contacts->getContact(array('source' => 'sourcename',  
> 'objectId' => $key));
> I receive an error:
> *Warning*: Illegal offset type in isset or empty in  
> */usr/share/horde3/turba/lib/api.php* on line *1393*
> I checked if I was using the correct source en objectId by using
> $registry->contacts->search(array('names' => $cn, 'sources' =>  
> 'sourcename', 'fields' => 'cn'));
> In the results of this search, I find that I am using the correct  
> key in the getContact method.

If you are using the overloaded interface of the registry like this,  
you have to specify the arguments like with any regular method call,  
i.e. not in an array:
$registry->contacts->getContact('sourcename', $key);


Do you need professional PHP or Horde consulting?

More information about the turba mailing list