Thank you very much for your answer. I have solved the problem with my way.
public function __construct($nick) {
if($nick != NULL) {//for user
$query = "SELECT * FROM Users WHERE nick='".$nick."'";
$result = App::runQuery($query);
$user = $result->fetch_object();
$this->id = $user->id;
$this->nick = $user->nick;
$this->email = $user->email;
$this->password = $user->password;
$this->birthDay = $user->birthDay;
$this->sex = $user->sex;
$this->about = $user->about;
$this->city = $user->city;
$this->photo = $user->photo;
$this->following = $user->following;
$this->followers = $user->followers;
$this->statu = $user->statu;
}else {//for null
$this->id = NULL;
$this->nick = NULL;
$this->email = NULL;
$this->password = NULL;
$this->birthDay = NULL;
$this->sex = NULL;
$this->about = NULL;
$this->city = NULL;
$this->photo = NULL;
$this->following = NULL;
$this->followers = NULL;
$this->statu = NULL;
}
}
It works!