Thanks for an awesome tip! It wasn't cool to see banned users and their names come up on the forum index. I used this, but I modified the query some:
Code:
$newuser = $vbulletin->db->query_first("SELECT userid, username FROM `" . TABLE_PREFIX . "user` WHERE joindate=(select max(joindate) from user where usergroupid!=8)");
I guess it should theoretically create a bit slower query on the database server, but result in less memory being allocated since the result is slimmed down to 1 row instead of all members in the users-table, even if the business class uses query_first. Never ran any tests to verify it, though. :-)