$query5 = $vbulletin->db->query("SELECT userid FROM user WHERE userid IN ($user) and find_in_set(18, membergroupids)");