thelordoftherings
Programmer
Hello,
I am using a SearchControls object in order to search in my LDAP.
I would like to get our departments inside the organization. For that I need only the OUs without the users inside them. The problem is this:
Assume controls is of type SearchControls.
When I use:
controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
I receive a list with the whole users but when I use:
controls.setSearchScope(SearchControls.ONELEVEL_SCOPE);
I receive nothing.
Why is that and how do I solve it?
I am using a SearchControls object in order to search in my LDAP.
I would like to get our departments inside the organization. For that I need only the OUs without the users inside them. The problem is this:
Assume controls is of type SearchControls.
When I use:
controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
I receive a list with the whole users but when I use:
controls.setSearchScope(SearchControls.ONELEVEL_SCOPE);
I receive nothing.
Why is that and how do I solve it?