I have changed
PHP Code:
$userid_q = $vbulletin->db->query_read("SELECT userid FROM " . TABLE_PREFIX . "user WHERE usergroupid NOT IN (3,4,5,20,21,23,45)");
$userids = array();
foreach ($useridq as $value) { $userids[] = $value; }
So that it will create an array there. The rest of the information is not an array, so the use should be right, just not the original use for getting a list of userids who fit the criterion.
new version:
http://pastebin.com/0FTFAEeq