<?php if (!defined('VB_ENTRY')) die('Access denied.'); class vB_Api_ReferUser extends vB_Api { protected $library = null; protected function __construct() { parent::__construct(); $this->library = vB_Library::instance('referuser'); } public function getReferralCode() { $this->checkHasPermission('genericpermissions2', 'canreferusers'); return $this->library->getReferralCode(); } public function validateReferralCode($referralCode) { return $this->library->validateReferralCode($referralCode); } public function fetchReferrers($startdate, $enddate) { $this->checkHasAdminPermission('canadminusers'); return $this->library->fetchReferrers($startdate, $enddate); } } 