Re: multivalued entries outof LDAP
| From: | Unknown Sender | Date: | Fri, 28 Sep 2001 06:32:59 +0000 |
| Subject: | Re: multivalued entries outof LDAP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69125@lists.php.net to get a copy of this message | ||
Hi
I'll try to help, but I don't really see what's wrong
On Thu, Sep 27, 2001 at 03:57:30PM +0200, Tanja Winkelmann wrote:
> $this->telephonenumber1 = $info[0]["telephonenumber"][0];
> print $user->getValues("telephonenumber1"); -> not
>
> $this->telephonenumber2 = $info[0]["telephonenumber"][1];
> print $user->getValues("telephonenumber1"); -> not
Can't see anything wrong here.
> $result=ldap_search($ds,$LDAP_BASE_O,"(uid=$uid)",$attribut);
> $info = ldap_get_entries($ds, $result);
> ldap_close($ds);
Could you insert a var_dump($info) here?
var_dump is a built in function that prints the contents. See if you
can find multiple phonenumbers in there. From the output it should
be clear how to access them as well.
If you can't find both numbers in there I would double check contents
of the LDAP server and try to repeat the exact same search with some
other tool and see if they both show up.
> $this->c = $info[0]["c"][0];
> ...
> $this->telephonenumber = $info[0]["telephonenumber"][0];
> $this->telephonenumber1 = $info[0]["telephonenumber"][0];
> $this->telephonenumber2 = $info[0]["telephonenumber"][1];
If I were to write this, I would make telephonenumber an array doing
just $this->telephonenumber = $info[0]["telephonenumber"];
Well, that doesn't solve your problem.
Stig