title: how to get DN in LDAP with user ID using UnboundID LDAP SDK
body: <p>I'm trying to get a DN ( could be more than one ) of a user when the only parameter i have is the user-id</p>
  
  <p>also i'm using UnboundID LDap SDK as you can see:</p>
  
  <pre><code>public String getCustomerAdminDN(String uid)
  {
  
      String result =null;
      String filter = "uid=" +uid;
      try {
          SearchResult searchResult = this.ldapConnection.search("",SearchScope.SUB,filter);
  
          result = searchResult.getMatchedDN();
      } catch (LDAPSearchException e) {
          throw new RuntimeException("Error in the searching query :" + e.getMessage());
      }
  
    return result;
  }
  </code></pre>
  
  <p>let's assume my uid belongs to the following DN</p>
  
  <p>Thanks from a head</p>