Skip to content

Commit

Permalink
Merge pull request #14 from deboorn/api-users-search-link-accounts-fix
Browse files Browse the repository at this point in the history
Api users search link accounts fix
  • Loading branch information
glena committed Jun 2, 2015
2 parents 8c4a943 + 0698f9a commit 5299007
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/API/ApiUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Auth0JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 5299007

Please sign in to comment.