public static boolean search(JID needle, Object haystack) {
        Group group = resolveFrom(haystack);
        return (group != null && group.isUser(needle));
    }
Search for a JID within a group. If the given haystack is not resolvable
to a group, this method returns false.

@param needle A JID, possibly a member/admin of the given group
@param haystack Presumably a Group, a Group name, or a JID that represents a Group
@return true if the JID (needle) is found in the group (haystack)
xmppserver/src/main/java/org/jivesoftware/openfire/group/Group.java