else { // imodcache is not set - do a query DEVDEBUG('QUERY: is the user a moderator (any forum)?'); $ismod_all = $DB_site->query("SELECT moderatorid, permissions FROM " . TABLE_PREFIX . "moderator WHERE userid = $userid"); while ($ismod = $DB_site->fetch_array($ismod_all)) { if ($do) { if ($ismod['permissions'] & $_BITFIELD['moderatorpermissions']["$do"]) { return 1; } } else { return 1; } } return 0; }