def METHOD_NAME(self, user):
    """Find the DN of the given user."""
    sbase = self.global_params["ldap_search_base"]
    sfilter = self.global_params["ldap_search_filter"]
    sfilter = sfilter % {"user": user}
    res = self.conn.search_s(
        force_str(sbase), ldap.SCOPE_SUBTREE, force_str(sfilter)
    )
    try:
        dn = res[0][0]
    except IndexError:
        return None
    return dn