From: Graham B. <gb...@po...> - 2001-04-19 20:08:26
|
dn is not an attribute. So you need to pick an attribute that you know will be there. try objectclass=* Graham. On Thu, Apr 19, 2001 at 08:50:21PM +0200, Dan G. Lunde wrote: > I would like to quickly check if an entry exists in LDAP. I struggled to find > a good solution. This is what I've come up with so far. It works for now, but > I would like to hear if anyone has any suggestions on improvements. > > The idea is to start searching directly in the leafnode, and match any dn. > > # See if the dn exists > $mesg = $ldap->search ( > base => "$dn", > filter => "dn=*" > ); > > I tried the $entry->exists('dn') without any luck. Any examples of working > code using exists? > > Dan > -- > Dan G. Lunde - dan...@c2... > http://home.world-online.no/~danglund/pgp/pgp...@c2...c > > |