UserID = $id; $result = Database::select('users', '*', 'WHERE id = :id', data: [':id' => $id]); $User = $result->fetch(); $this->Username = $User['username']; $this->Title = $User['title']; $this->Email = $User['email']; $this->Gender = $User['gender']; $this->Badges = $User['badges']; $this->AboutMe = $User['blurb']; $this->WhatsUp = $User['status']; $this->BirthDay = $User['bday']; $this->JoinDate = $User['joindate']; $this->PostCount = $User['posts']; $this->Avatar = $User['avatar']; $this->Reputation = $User['reputation']; $this->MemberLevel = $User['mlevel']; } public function __get($what) { return property_exists($this, $what) ? $this->{$what} : null; } }