Everything in the PHP code is correct (I checked myself) and there is no error from curl, but the result is always an empty variable (No true/false).
public function prepareUser() {
$url = $this->TwitchAPI->endUrl("USERT");
$temp = curl_init();
curl_setopt($temp, CURLOPT_URL, $url);
curl_setopt($temp, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($temp, CURLOPT_HEADER, array("Authorization" => "OAuth " . $this->access_token));
curl_setopt($temp, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($temp, CURLOPT_SSL_VERIFYPEER, false);
$ret = curl_exec($temp);
if (curl_errno($temp)) {
die("Error - " . curl_error($temp));
}
curl_close($temp);
$this->user = json_decode($ret);
}