From e352a4e37a49ae36903e9674aeff4522736a2032 Mon Sep 17 00:00:00 2001 From: Paul Giberson Date: Tue, 31 Oct 2017 03:53:27 -0700 Subject: [PATCH 1/3] Fixes build (#211) --- tests/API/Management/AuthApiTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/API/Management/AuthApiTest.php b/tests/API/Management/AuthApiTest.php index 7d0e6a3a..c4851302 100644 --- a/tests/API/Management/AuthApiTest.php +++ b/tests/API/Management/AuthApiTest.php @@ -39,8 +39,8 @@ public function testAuthorizeWithRO() { $this->assertArrayHasKey('email', $userinfo); $this->assertArrayHasKey('email_verified', $userinfo); $this->assertArrayHasKey('user_id', $userinfo); - $this->assertEquals('auth@test.com', $userinfo['email']); - $this->assertEquals('auth0|57e293c6247600bf0ba47fc2', $userinfo['user_id']); + $this->assertEquals('german@auth0.com', $userinfo['email']); + $this->assertEquals('auth0|58adc60b82b0ca0774643eef', $userinfo['user_id']); } public function testOauthToken() { From 3bb50473c1c4044a353e56bb4dc57426961e7784 Mon Sep 17 00:00:00 2001 From: Erwan Richard Date: Mon, 30 Oct 2017 12:39:18 +0100 Subject: [PATCH 2/3] Add support for the new users by email API --- src/API/Management.php | 2 ++ src/API/Management/UsersByEmail.php | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/API/Management/UsersByEmail.php diff --git a/src/API/Management.php b/src/API/Management.php index 6183daca..f07079a8 100644 --- a/src/API/Management.php +++ b/src/API/Management.php @@ -16,6 +16,7 @@ use Auth0\SDK\API\Management\Tickets; use Auth0\SDK\API\Management\UserBlocks; use Auth0\SDK\API\Management\Users; +use Auth0\SDK\API\Management\UsersByEmail; use Auth0\SDK\API\Helpers\ApiClient; use Auth0\SDK\API\Header\Authorization\AuthorizationBearer; @@ -146,6 +147,7 @@ public function __construct($token, $domain, $guzzleOptions = []) { $this->tickets = new Tickets($this->apiClient); $this->userBlocks = new UserBlocks($this->apiClient); $this->users = new Users($this->apiClient); + $this->usersByEmail = new UsersByEmail($this->apiClient); } protected function setApiClient() { diff --git a/src/API/Management/UsersByEmail.php b/src/API/Management/UsersByEmail.php new file mode 100644 index 00000000..ad3ab051 --- /dev/null +++ b/src/API/Management/UsersByEmail.php @@ -0,0 +1,18 @@ +apiClient->get() + ->addPath('users-by-email'); + + foreach ($params as $param => $value) { + $client->withParam($param, $value); + } + + return $client->call(); + } +} From e9d484d776ff64ccd1a28228a0d61638045143e1 Mon Sep 17 00:00:00 2001 From: Martin Walsh Date: Fri, 24 Nov 2017 15:41:07 +0000 Subject: [PATCH 3/3] Update Changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fca2325..f2b4122d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## [5.0.6](https://github.com/auth0/auth0-PHP/tree/5.0.4) (2017-11-24) +[Full Changelog](https://github.com/auth0/auth0-PHP/compare/5.0.4...5.0.6) + +**Added** +- Add support for the new users by email API [\#213](https://github.com/auth0/auth0-PHP/pull/213) ([erichard](https://github.com/erichard)) + +**Fixed** +- Fixes build [\#211](https://github.com/auth0/auth0-PHP/pull/211) ([aknosis](https://github.com/aknosis)) + ## [5.0.4](https://github.com/auth0/auth0-PHP/tree/5.0.4) (2017-06-26) [Full Changelog](https://github.com/auth0/auth0-PHP/compare/5.0.0...5.0.4)