From 44ee268297fd94b59a01490decbf14fa81725343 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 4 Aug 2015 14:41:37 +0300 Subject: [PATCH 1/3] Comment out code that rewrites user_id property in $body And actually it is useless code as i see. --- src/API/ApiUsers.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/API/ApiUsers.php b/src/API/ApiUsers.php index e8893a9d..7da9b8a0 100644 --- a/src/API/ApiUsers.php +++ b/src/API/ApiUsers.php @@ -142,12 +142,12 @@ public static function createEmailVerificationTicket($domain, $token, $user_id, ->withHeader(new AuthorizationBearer($token)) ->withBody(json_encode($body)); - if ($result_url) { - $body = json_encode(array( - 'result_url' => $result_url - )); - $request->withBody($body); - } + // if ($result_url) { + // $body = json_encode(array( + // 'result_url' => $result_url + // )); + // $request->withBody($body); + // } return $request->call(); From 08e3f5edaaa9cb059b1c263a8bf1b9233e6b221f Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 4 Aug 2015 15:14:24 +0300 Subject: [PATCH 2/3] Add application/json content-type --- src/API/ApiUsers.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/API/ApiUsers.php b/src/API/ApiUsers.php index 7da9b8a0..444c1ad2 100644 --- a/src/API/ApiUsers.php +++ b/src/API/ApiUsers.php @@ -139,6 +139,7 @@ public static function createEmailVerificationTicket($domain, $token, $user_id, $request = self::getApiV2Client($domain)->post() ->tickets() ->addPath('email-verification') + ->withHeader(new ContentType('application/json')) ->withHeader(new AuthorizationBearer($token)) ->withBody(json_encode($body)); From 78da395b53456b1a66ba8631897271d8d3cff4c5 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 4 Aug 2015 16:21:08 +0300 Subject: [PATCH 3/3] remove useless code --- src/API/ApiUsers.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/API/ApiUsers.php b/src/API/ApiUsers.php index 444c1ad2..f49fb6f2 100644 --- a/src/API/ApiUsers.php +++ b/src/API/ApiUsers.php @@ -143,13 +143,6 @@ public static function createEmailVerificationTicket($domain, $token, $user_id, ->withHeader(new AuthorizationBearer($token)) ->withBody(json_encode($body)); - // if ($result_url) { - // $body = json_encode(array( - // 'result_url' => $result_url - // )); - // $request->withBody($body); - // } - return $request->call(); }