diff --git a/src/API/ApiUsers.php b/src/API/ApiUsers.php index a3e98d90..ed208334 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(); } diff --git a/src/Auth0JWT.php b/src/Auth0JWT.php index 8b8d8474..e179cf4d 100644 --- a/src/Auth0JWT.php +++ b/src/Auth0JWT.php @@ -53,7 +53,7 @@ public static function encode($client_id, $client_secret, $scopes = null, $custo $payload["scopes"] = $scopes; } - if ($scopes) { + if ($custom_payload) { $custom_payload = array_merge($custom_payload, $payload); }