public function findUser($tag) { if (!isset($this->users[$tag])) { $result = $this->db->query("SELECT * FROM `user` WHERE `id` = '$tag' OR `name` = '$tag' LIMIT 1"); $this->users[$tag] = $this->db->fetch($result); } return $this->users[$tag]; }