From 0698f9a3eee57fd33df6a06aa48dc821756ca12c Mon Sep 17 00:00:00 2001 From: Daniel Boorn Date: Tue, 26 May 2015 21:39:19 -0400 Subject: [PATCH] ApiUsers search and link account fixes --- src/API/ApiUsers.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/API/ApiUsers.php b/src/API/ApiUsers.php index 10724658..1be9aa41 100644 --- a/src/API/ApiUsers.php +++ b/src/API/ApiUsers.php @@ -54,11 +54,10 @@ public static function create($domain, $token, $data) { public static function search($domain, $token, $params) { - $client = self::getApiV2Client($domain)->post() + $client = self::getApiV2Client($domain)->get() ->users() ->withHeader(new AuthorizationBearer($token)) - ->withHeader(new ContentType('application/json')) - ->withBody(json_encode($data)); + ->withHeader(new ContentType('application/json')); foreach ($params as $param => $value) { $client->withParam($param, $value); @@ -99,7 +98,7 @@ public static function linkAccount($domain, $token, $user_id, $post_identities_b ->devices() ->withHeader(new AuthorizationBearer($token)) ->withHeader(new ContentType('application/json')) - ->withBody(json_encode($body)) + ->withBody(json_encode($post_identities_body)) ->call(); }