$usercount = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE usergroupid='2'"); $totalusers = vb_number_format($usercount); if ($totalusers > 2000) die ("Registration is closed");