'Returns true if our user is a member of the given group.'

def is_member_of(self, group_dn):

    is_member = None
    group_dn = group_dn.lower()
    if (self._group_dns is None):
        is_member = self._group_type.is_member(self._ldap_user, group_dn)
    if (is_member is None):
        is_member = (group_dn in self.get_group_dns())
    logger.debug('%s    is%sa    member    of    %s', self._ldap_user.dn, ((is_member and '    ') or '    not    '), group_dn)
    return is_member
