83 $token = $this->settings[
"serviceUserToken"];
85 curl_setopt_array($curl, array(
86 CURLOPT_URL => $this->settings[
"domain"] .
"/v2beta/users/$this->userid?" . $this->encodeUserData(),
87 CURLOPT_RETURNTRANSFER =>
true,
88 CURLOPT_ENCODING =>
'',
89 CURLOPT_MAXREDIRS => 10,
91 CURLOPT_FOLLOWLOCATION =>
true,
92 CURLOPT_CUSTOMREQUEST =>
'PUT',
93 CURLOPT_HTTPHEADER => array(
94 "Accept: application/json",
95 "Authorization: Bearer $token"
98 $response = json_decode(curl_exec($curl));
99 if(isset($response->code)) {
100 throw new Exception(
"Error-Code: " . $response->code .
" Message: " . $response->message);