if( currentuser != null ) {   int userid = currentuser.getID();  TableRowIterator tri = DatabaseManager.query(c, "eperson", "SELECT eperson.* FROM eperson, epersongroup2eperson WHERE " + "epersongroup2eperson.eperson_id=eperson.eperson_id AND " + "epersongroup2eperson.eperson_group_id=" + groupid + " AND eperson.eperson_id=" + userid );  if( tri.hasNext() ) { return true; } } return false;
return epeople.contains(e);
    public static boolean isMember(Context c, int groupid)        throws SQLException    {        // special, everyone is member of group 0 (anonymous)        if( groupid == 0 ) return true;        // first, check for membership if it's a special group        // (special groups can be set even if person isn't authenticated)        if( c.inSpecialGroup( groupid ) )        {            return true;        }                   EPerson currentuser = c.getCurrentUser();                //  only test for membership if context contains a user        if( currentuser != null )        {                    // not in special groups, try database            int userid = currentuser.getID();                        TableRowIterator tri = DatabaseManager.query(c,                "eperson",                "SELECT eperson.* FROM eperson, epersongroup2eperson WHERE " +                    "epersongroup2eperson.eperson_id=eperson.eperson_id AND " +                    "epersongroup2eperson.eperson_group_id=" +                    groupid +                    " AND eperson.eperson_id=" +                    userid );            if( tri.hasNext() )            {                return true;            }        }        return false;    }