lib = $lib; $this->db = $this->lib->game->db; } function run($uid) { if (!is_null($this->userNames[$uid])) { return $this->userNames[$uid]; } $q = $this->db->query("SELECT name FROM account WHERE id=$uid"); if (!($q && dbCount($q))) { return null; } list($this->userNames[$uid]) = dbFetchArray($q); return $this->userNames[$uid]; } } ?>