1 Reply Latest reply on Sep 15, 2009 6:43 AM by ilssac

    cfldap query

    Rodrigo Alarcon Level 1

      Hello ppl, it's been a very long time since i last posted here, ne way, i hope i can get some help from you guys.


      This time i'm posting here because i'm having some issues with cfldap.


      So far i have this:


      <cfldap username="some_user"
        filter="(&(objectclass=organizationalunit)(!(|(name=computers)(name=groups)(name=servers) )))"


      <cfquery name="FilterLDAP" dbtype="query">
          SELECT DISTINCT(ou)
        FROM LdapAreaQuery



      So far i'm using FilterLDAP to populate a cfselect (used as a filter) with all the Organizational Units that are not computers, groups or servers, the thing is that i'm getting this cfselect populated with sub-ou, for example: OU=Support,OU=IT,DC=mynetwork,dc=com the thing is that i ONLY need the 1st level of the OU not the whole thing (what i need is OU=IT,DC=mynetwork,dc=com)


      TY in advance!

        • 1. Re: cfldap query
          ilssac Level 5

          First suggestion.  Make your start more specific.  If you only want "OU-IT,DC=mynetwork,DC=com".  Put all that in your start parameter.


          Secondly play with the scope parameter which can have the following parameters,:

          • oneLevel: entries one level below entry.
          • base: only the entry.
          • subtree: entry and all levels below it.