public function findUser tag if isset this- users tag result this- db-

1
2
3
4
5
6
7
8
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];
}