Skip to content

Commit 9ffa766

Browse files
author
David Djian
committed
update query register and return replace echo
1 parent 1069f1f commit 9ffa766

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/Graphcomment.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function authentification()
144144

145145
$this->setToken($result->token);
146146
} else {
147-
echo $res->getBody();
147+
return $res->getBody();
148148
}
149149
}
150150

@@ -174,7 +174,7 @@ public function getUsersQuery($page_size = "10", $page_nbr = "1", $query = "user
174174
'http_errors' => false
175175
]);
176176

177-
echo $res->getBody();
177+
return $res->getBody();
178178
}
179179

180180
/**
@@ -212,14 +212,17 @@ public function registerUser($username, $email, $language = "en")
212212
'contents' => $this->getWebsiteId()
213213
]
214214
],
215+
'query' => [
216+
'website_id' => $this->getWebsiteId()
217+
],
215218
'http_errors' => false
216219
]);
217220

218221
if ($res->getStatusCode() == "200") {
219-
echo $res->getBody();
222+
return $res->getBody();
220223
}
221224
else {
222-
echo $res->getBody();
225+
return $res->getBody();
223226
}
224227
}
225228

@@ -244,7 +247,7 @@ public function loginUser($gc_id)
244247
'http_errors' => false
245248
]);
246249

247-
echo $res->getBody();
250+
return $res->getBody();
248251
}
249252

250253
/**
@@ -269,6 +272,6 @@ public function getThread($url)
269272
'http_errors' => false
270273
]);
271274

272-
echo $res->getBody();
275+
return $res->getBody();
273276
}
274277
}

0 commit comments

Comments
 (0)