Skip to content

Commit b3aa7a8

Browse files
authored
Merge pull request #213 from erichard/new-users-by-email-api
Add support for the new users by email API
2 parents e352a4e + 3bb5047 commit b3aa7a8

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/API/Management.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Auth0\SDK\API\Management\Tickets;
1717
use Auth0\SDK\API\Management\UserBlocks;
1818
use Auth0\SDK\API\Management\Users;
19+
use Auth0\SDK\API\Management\UsersByEmail;
1920

2021
use Auth0\SDK\API\Helpers\ApiClient;
2122
use Auth0\SDK\API\Header\Authorization\AuthorizationBearer;
@@ -146,6 +147,7 @@ public function __construct($token, $domain, $guzzleOptions = []) {
146147
$this->tickets = new Tickets($this->apiClient);
147148
$this->userBlocks = new UserBlocks($this->apiClient);
148149
$this->users = new Users($this->apiClient);
150+
$this->usersByEmail = new UsersByEmail($this->apiClient);
149151
}
150152

151153
protected function setApiClient() {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Auth0\SDK\API\Management;
4+
5+
class UsersByEmail extends GenericResource
6+
{
7+
public function get($params = array())
8+
{
9+
$client = $this->apiClient->get()
10+
->addPath('users-by-email');
11+
12+
foreach ($params as $param => $value) {
13+
$client->withParam($param, $value);
14+
}
15+
16+
return $client->call();
17+
}
18+
}

0 commit comments

Comments
 (0)