Find Users

Finds Users matching your criteria. The users->find method supports a fluent style where you can chain together your search criteria.

Method Signature

find(Filter $filter = null, string $pageToken = null, int $pageSize = null): UsersPage


$filterFilterThe filter criteria to search by, or null to fetch all Users.
$pageTokenstringThe token of the page to fetch.
$pageSizeintThe number of results per page to fetch.

You can search for matches among the following attributes of the Where class.

textstringMatch against the user's Full Name



 * This example demonstrates listing all users

require_once(__DIR__ . '/vendor/autoload.php');

use Catalytic\SDK\CatalyticClient;
use Catalytic\SDK\Search\Where;

$catalytic = new CatalyticClient();

$where = (new Where())->text()->matches('alice');
$results = $catalytic->users()->find($where);
$users = $results->getUsers();

// Fetch all pages and push the users into $users
while (!empty($results->getNextPageToken())) {
    $results = $catalytic->users()->find($where, $results->getNextPageToken());
    $users = array_merge($users, $results->getUsers());