Re: multivalued entries outof LDAP

From: Date: Fri, 28 Sep 2001 07:10:56 +0000
Subject: Re: multivalued entries outof LDAP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-69133@lists.php.net to get a copy of this message
Hi Stig, thanks for your answer, but I have something to admit, that nobody thinks about it anymore.... I imported my wrong Class.inc, where I defined my variables and methods ... thats why it doesn't work.... - painful. Otherwise it works actually fine!!! Anyhow thanks, Tanja Stig Venaas schrieb: > 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 -- Gruss Tanja --------------------- DO IT RIGHT .SHE -------------------------- SHE Informationstechnologie AG Tanja Winkelmann Fon:+49 621 5200-247 Studentin Fax:+49 621 5200-551 Donnersbergweg 3 tanja.winkelmann@she.net D-67059 Ludwigshafen http://www.she.net -----------------------------------------------------------------

« previous php.general (#69133) next »