src/Objects/Ldap.php
public function find($identifier, array $fields = [ ])
    {
        // Get all result entries
        $results = $this->ldap->search(
            $this->base_dn,
            $this->search_filter . '=' . $identifier,
            ( $fields ?: $this->search_fields )
        );

        if (count($results) > 0) {
            $entry = $this->ldap->entry($results);

            // Returning a single LDAP entry
            if (isset( $entry[0] ) && ! empty( $entry[0] )) {
                return $entry[0];
            }
        }

        throw new EmptySearchResultException;
    }
public function find($identifier, array $fields = [ ])
    {
        // Get all result entries
        $results = $this->ldap->search(
            $this->base_dn,
            $this->search_filter . '=' . $identifier,
            ( $fields ?: $this->search_fields )
        );

        if (count($results) > 0) {
            $entry = $this->ldap->entry($results);

            // Returning a single LDAP entry
            if (isset( $entry[0] ) && ! empty( $entry[0] )) {
                return $entry[0];
            }
        }

        throw new EmptySearchResultException;
    }
Execute a search query in the LDAP Base DN.

@param string $identifier msdn.microsoft.com/En-US/library/aa746475.aspx
@param array  $fields     specific attributes to be returned

@return array $entry
@throws EmptySearchResultException