Skip to content

Commit

Permalink
Merge pull request #213 from erichard/new-users-by-email-api
Browse files Browse the repository at this point in the history
Add support for the new users by email API
  • Loading branch information
glena authored Nov 3, 2017
2 parents e352a4e + 3bb5047 commit b3aa7a8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/API/Management.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down
18 changes: 18 additions & 0 deletions src/API/Management/UsersByEmail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Auth0\SDK\API\Management;

class UsersByEmail extends GenericResource
{
public function get($params = array())
{
$client = $this->apiClient->get()
->addPath('users-by-email');

foreach ($params as $param => $value) {
$client->withParam($param, $value);
}

return $client->call();
}
}

0 comments on commit b3aa7a8

Please sign in to comment.