'/'); private $options = array(); public function optionget($item) { if (!isset($this->options[$item])) { throw new Exception(sprintf("You didn't set the option '%s' on the mock user using optionset.", $item)); } return $this->options[$item]; } public function optionset($item, $value) { $this->options[$item] = $value; } public function check_ban($user_id = false, $user_ips = false, $user_email = false, $return = false) { $banned_users = $this->optionget('banned_users'); foreach ($banned_users as $banned) { if ($banned == $user_id || $banned == $user_ips || $banned == $user_email) { return true; } } return false; } }