From ad0711a1856e9b422ac780ddb87b67ddbbec0ef1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 14:19:19 +0000 Subject: [PATCH 1/2] Bump auth0/auth0-php from 8.15.0 to 9.2.0 Bumps [auth0/auth0-php](https://github.com/auth0/auth0-PHP) from 8.15.0 to 9.2.0. - [Release notes](https://github.com/auth0/auth0-PHP/releases) - [Changelog](https://github.com/auth0/auth0-PHP/blob/main/CHANGELOG.md) - [Upgrade guide](https://github.com/auth0/auth0-PHP/blob/main/UPGRADE.md) - [Commits](https://github.com/auth0/auth0-PHP/compare/8.15.0...9.2.0) --- updated-dependencies: - dependency-name: auth0/auth0-php dependency-version: 9.2.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 69 +++++++++++++++++++++++++++------------------------ 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/composer.json b/composer.json index 4a1b2137..8cd12b34 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "smarty/smarty": "^5.8.4", "sendgrid/sendgrid": "^8.1", "google/cloud-logging": "1.28.*", - "auth0/auth0-php": "^8.0.5", + "auth0/auth0-php": "^9.2.0", "opencensus/opencensus": "^0.7.0", "kriswallsmith/buzz": "^1.4", "nyholm/psr7": "^1.4", diff --git a/composer.lock b/composer.lock index b4d5c747..54249806 100644 --- a/composer.lock +++ b/composer.lock @@ -4,46 +4,51 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0c89c5eb2f27eba1428ef1c9bd05d58b", + "content-hash": "7e02d90e90ea31db114fbcbb2e320d9e", "packages": [ { "name": "auth0/auth0-php", - "version": "8.15.0", + "version": "9.2.0", "source": { "type": "git", "url": "https://github.com/auth0/auth0-PHP.git", - "reference": "7f4414045fc7dc257baf8451a9cda2aacb7ed03b" + "reference": "ea164c2939cecdad59b2ef71ef865c5553377662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/auth0/auth0-PHP/zipball/7f4414045fc7dc257baf8451a9cda2aacb7ed03b", - "reference": "7f4414045fc7dc257baf8451a9cda2aacb7ed03b", + "url": "https://api.github.com/repos/auth0/auth0-PHP/zipball/ea164c2939cecdad59b2ef71ef865c5553377662", + "reference": "ea164c2939cecdad59b2ef71ef865c5553377662", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "php": "^8.1", + "php": "^8.2", + "php-http/discovery": "^1.0", "php-http/multipart-stream-builder": "^1", "psr-discovery/all": "^1", + "psr/http-client": "^1.0", "psr/http-client-implementation": "^1", + "psr/http-factory": "^1.0", "psr/http-factory-implementation": "^1", + "psr/http-message": "^1.1 || ^2.0", "psr/http-message-implementation": "^1" }, "require-dev": { - "ergebnis/composer-normalize": "~2.43.0", - "friendsofphp/php-cs-fixer": "~3.59.0", - "mockery/mockery": "~1.6.0", - "pestphp/pest": "~2.34.0", - "phpstan/phpstan": "~1.11.0", - "phpstan/phpstan-strict-rules": "~1.6.0", - "psr-mock/http": "~1.0.0", - "rector/rector": "~0.17.0", - "spatie/ray": "~1.41.0", - "symfony/cache": "^4 || ^5 || ^6", - "symfony/event-dispatcher": "^4 || ^5 || ^6", - "vimeo/psalm": "~5.25.0", + "ergebnis/composer-normalize": "^2.43", + "friendsofphp/php-cs-fixer": "^3.59", + "guzzlehttp/guzzle": "^7.4", + "mockery/mockery": "^1.6", + "pestphp/pest": "^3.0", + "phpstan/phpstan": "^1.11 || ^2.0", + "phpstan/phpstan-strict-rules": "^1.6 || ^2.0", + "phpunit/phpunit": "^11.0 || ^12.0", + "psr-mock/http": "^1.0", + "rector/rector": "^1.0 || ^2.0", + "symfony/cache": "^6 || ^7", + "symfony/event-dispatcher": "^6 || ^7", + "vimeo/psalm": "^5.25 || ^6.0", "wikimedia/composer-merge-plugin": "~2.1.0" }, "suggest": { @@ -101,9 +106,9 @@ ], "support": { "issues": "https://github.com/auth0/auth0-PHP/issues", - "source": "https://github.com/auth0/auth0-PHP/tree/8.15.0" + "source": "https://github.com/auth0/auth0-PHP/tree/9.2.0" }, - "time": "2025-05-30T09:50:59+00:00" + "time": "2026-09-02T15:01:34+00:00" }, { "name": "bacon/bacon-qr-code", @@ -644,16 +649,16 @@ }, { "name": "composer/semver", - "version": "3.5.0", + "version": "3.5.1", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "f7a296f4c4cf8cb8bb83e35d6951a406bb11afa5" + "reference": "528948210cc46f967a4b98e83b19e76f2b504993" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/f7a296f4c4cf8cb8bb83e35d6951a406bb11afa5", - "reference": "f7a296f4c4cf8cb8bb83e35d6951a406bb11afa5", + "url": "https://api.github.com/repos/composer/semver/zipball/528948210cc46f967a4b98e83b19e76f2b504993", + "reference": "528948210cc46f967a4b98e83b19e76f2b504993", "shasum": "" }, "require": { @@ -705,7 +710,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.5.0" + "source": "https://github.com/composer/semver/tree/3.5.1" }, "funding": [ { @@ -717,7 +722,7 @@ "type": "github" } ], - "time": "2026-09-24T14:38:51+00:00" + "time": "2026-10-05T13:12:12+00:00" }, { "name": "dasprid/enum", @@ -3110,16 +3115,16 @@ }, { "name": "psr-discovery/http-client-implementations", - "version": "1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/psr-discovery/http-client-implementations.git", - "reference": "3999d98e4fcbf099efeda07df82c59134f932ad8" + "reference": "c104e0fc5b6204a22cdacb6e41c73065fadf0ad4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psr-discovery/http-client-implementations/zipball/3999d98e4fcbf099efeda07df82c59134f932ad8", - "reference": "3999d98e4fcbf099efeda07df82c59134f932ad8", + "url": "https://api.github.com/repos/psr-discovery/http-client-implementations/zipball/c104e0fc5b6204a22cdacb6e41c73065fadf0ad4", + "reference": "c104e0fc5b6204a22cdacb6e41c73065fadf0ad4", "shasum": "" }, "require": { @@ -3177,9 +3182,9 @@ ], "support": { "issues": "https://github.com/psr-discovery/http-client-implementations/issues", - "source": "https://github.com/psr-discovery/http-client-implementations/tree/1.4.0" + "source": "https://github.com/psr-discovery/http-client-implementations/tree/v1.5.0" }, - "time": "2024-12-05T18:08:01+00:00" + "time": "2026-03-09T20:38:48+00:00" }, { "name": "psr-discovery/http-factory-implementations", From c0b7082aea105d27da0ff5c0d48536f3f928b184 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:57:39 +0000 Subject: [PATCH 2/2] Adapt Auth0 Management API usage to auth0-php 9 (ManagementClient, typed requests) Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- include/cms_users_edit.php | 21 ++- library/lib/auth0.php | 266 +++++++++++++++---------------------- 2 files changed, 116 insertions(+), 171 deletions(-) diff --git a/include/cms_users_edit.php b/include/cms_users_edit.php index 78f91869..f47d75b4 100644 --- a/include/cms_users_edit.php +++ b/include/cms_users_edit.php @@ -1,6 +1,6 @@ usersByEmail()->get($_POST['email']); - - if (HttpResponse::wasSuccessful($authUser)) { - $authUser = HttpResponse::decodeContent($authUser); - if ($authUser && $authUser[0]['blocked']) { - redirect('?action=cms_users_edit&origin='.$_POST['_origin'].'&warning=1&message=This email already exists in the system. Please use a different email to create a new user!'); - trigger_error('This email already exists in the system. Please use a different email to create a new user!', E_USER_NOTICE); - } elseif (!$existinguser && $authUser && !$authUser[0]['blocked']) { - throw new Exception('The user already exists in AUTH0 but its not sync', 409); - } - } else { - throw new Exception($authUser->getReasonPhrase(), $authUser->getStatusCode()); + // auth0-php 9 returns typed objects and throws an Auth0ApiException on non-2XX responses + $authUser = auth0ToArray($mgmtAPI->users->listUsersByEmail(new ListUsersByEmailRequestParameters(['email' => $_POST['email']])) ?? []); + if ($authUser && !empty($authUser[0]['blocked'])) { + redirect('?action=cms_users_edit&origin='.$_POST['_origin'].'&warning=1&message=This email already exists in the system. Please use a different email to create a new user!'); + trigger_error('This email already exists in the system. Please use a different email to create a new user!', E_USER_NOTICE); + } elseif (!$existinguser && $authUser && empty($authUser[0]['blocked'])) { + throw new Exception('The user already exists in AUTH0 but its not sync', 409); } // Validate if user can access this user account diff --git a/library/lib/auth0.php b/library/lib/auth0.php index 0de887c1..9e2e3abc 100644 --- a/library/lib/auth0.php +++ b/library/lib/auth0.php @@ -1,11 +1,26 @@ management(); // new Management($configuration); +/** + * Collecting all items of a paginated Management API result as plain arrays. + * + * Note: always pass includeTotals=true in the list requests. The v9 request classes do not send the + * parameter by default, while the Pager response types expect the {items, start, limit, total} shape. + */ +function auth0PagerToArray(iterable $pager): array +{ + $items = []; + foreach ($pager as $item) { + $items[] = auth0ToArray($item); + } + + return $items; } /** @@ -81,7 +126,7 @@ function deleteAuth0User($userId) global $settings; $mgmtAPI = getAuth0Management($settings); $auth0UserId = 'auth0|'.intval($userId); - $mgmtAPI->users()->delete($auth0UserId); + $mgmtAPI->users->delete($auth0UserId); } // because users are updated in all kinds of ways and the @@ -112,7 +157,7 @@ function updateAuth0UserFromDb($userId, $setPwd = false) 'email' => $dbUserData['email'], 'name' => $dbUserData['naam'], 'blocked' => '0000-00-00 00:00:00' != $dbUserData['deleted'] && !is_null($dbUserData['deleted']), - 'app_metadata' => [ + 'appMetadata' => [ 'usergroup_id' => $dbUserData['cms_usergroups_id'], 'organisation_id' => $dbUserData['organisation_id'], 'base_ids' => $dbUserData['base_ids'], @@ -120,37 +165,36 @@ function updateAuth0UserFromDb($userId, $setPwd = false) 'connection' => 'Username-Password-Authentication', ]; if ('0000-00-00 00:00:00' != $dbUserData['deleted'] && !is_null($dbUserData['deleted'])) { - $auth0UserData['app_metadata']['last_blocked_date'] = $dbUserData['deleted']; + $auth0UserData['appMetadata']['last_blocked_date'] = $dbUserData['deleted']; $auth0UserData['email'] = preg_replace('/\.deleted\.\d+/', '', (string) $dbUserData['email']); } if ($dbUserData['valid_firstday'] && '0000-00-00' != $dbUserData['valid_firstday']) { - $auth0UserData['app_metadata']['valid_firstday'] = $dbUserData['valid_firstday']; + $auth0UserData['appMetadata']['valid_firstday'] = $dbUserData['valid_firstday']; } else { - $auth0UserData['app_metadata']['valid_firstday'] = null; + $auth0UserData['appMetadata']['valid_firstday'] = null; } if ($dbUserData['valid_lastday'] && '0000-00-00' != $dbUserData['valid_lastday']) { - $auth0UserData['app_metadata']['valid_lastday'] = $dbUserData['valid_lastday']; + $auth0UserData['appMetadata']['valid_lastday'] = $dbUserData['valid_lastday']; } else { - $auth0UserData['app_metadata']['valid_lastday'] = null; + $auth0UserData['appMetadata']['valid_lastday'] = null; } - $response = $mgmtAPI->users()->update($auth0UserId, $auth0UserData); - usleep(200000); + // since auth0-php 9 a non-2XX response throws an Auth0ApiException instead of being returned + try { + $mgmtAPI->users->update($auth0UserId, new UpdateUserRequestContent($auth0UserData)); + usleep(200000); + } catch (Auth0ApiException $e) { + if (404 !== $e->getCode()) { + throw $e; + } - // user doesn't exist, so try creating it instead - if (404 === $response->getStatusCode()) { - $auth0UserData['user_id'] = preg_replace('/auth0\|/', '', $auth0UserId); + // user doesn't exist, so try creating it instead + $auth0UserData['userId'] = preg_replace('/auth0\|/', '', $auth0UserId); $auth0UserData['password'] = generateSecureRandomString(); // user will need to reset password anyway - $response = $mgmtAPI->users()->create($settings['auth0_db_connection_id'], $auth0UserData); + $auth0UserData['connection'] = $settings['auth0_db_connection_id']; + $mgmtAPI->users->create(new CreateUserRequestContent($auth0UserData)); usleep(200000); - - // the status code will be 201 if the user created successfully - if (201 !== $response->getStatusCode()) { - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); - } - } elseif (200 !== $response->getStatusCode()) { - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); } // set user roles in auth0 @@ -173,7 +217,7 @@ function updateAuth0UserFromDb($userId, $setPwd = false) if ($setPwd) { // needed for reseeding test env - $mgmtAPI->users()->update($auth0UserId, ['password' => $setPwd]); + $mgmtAPI->users->update($auth0UserId, new UpdateUserRequestContent(['password' => $setPwd])); } } @@ -187,7 +231,7 @@ function updateAuth0Password($userId, $password) { global $settings; $mgmtAPI = getAuth0Management($settings); - $mgmtAPI->users()->update('auth0|'.intval($userId), ['password' => $password, 'connection' => 'Username-Password-Authentication']); + $mgmtAPI->users->update('auth0|'.intval($userId), new UpdateUserRequestContent(['password' => $password, 'connection' => 'Username-Password-Authentication'])); } /** @@ -379,18 +423,17 @@ function getAuth0UserByEmail($email) try { global $settings; $mgmtAPI = getAuth0Management($settings); - $response = $mgmtAPI->usersByEmail()->get($email); + // usersByEmail() was merged into users->listUsersByEmail() in auth0-php 9 + $users = $mgmtAPI->users->listUsersByEmail(new ListUsersByEmailRequestParameters(['email' => $email])); - if (HttpResponse::wasSuccessful($response)) { - return HttpResponse::decodeContent($response); - } - - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); - } catch (Auth0Exception $e) { + return auth0ToArray($users ?? []); + } catch (Auth0ApiException $e) { // user doesn't exist in auth0 if (404 == $e->getCode()) { return null; } + + throw $e; } } else { return null; @@ -406,13 +449,8 @@ function getAuth0User($userId) { global $settings; $mgmtAPI = getAuth0Management($settings); - $response = $mgmtAPI->users()->get('auth0|'.intval($userId)); - - if (HttpResponse::wasSuccessful($response)) { - return HttpResponse::decodeContent($response); - } - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); + return auth0ToArray($mgmtAPI->users->get('auth0|'.intval($userId))); } /** @@ -426,23 +464,13 @@ function getRolesByBaseIds(array $baseIds) $roles = []; foreach ($baseIds as $baseId) { - $body = [ - 'name_filter' => "base_{$baseId}_", - ]; - - $response = $mgmtAPI->roles()->getAll($body); - - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - foreach ($res as $role) { - if (!empty($role) && preg_match('/base_'.$baseId.'_.*/', (string) $role['name'])) { - array_push($roles, $role); - } + $res = auth0PagerToArray($mgmtAPI->roles->list(new ListRolesRequestParameters(['nameFilter' => "base_{$baseId}_", 'includeTotals' => true]))); + foreach ($res as $role) { + if (!empty($role) && preg_match('/base_'.$baseId.'_.*/', (string) $role['name'])) { + array_push($roles, $role); } - usleep(2000); - } else { - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); } + usleep(2000); } return $roles; @@ -458,19 +486,9 @@ function getRolesByName($roleName) global $settings; $mgmtAPI = getAuth0Management($settings); - $body = [ - 'name_filter' => $roleName, - ]; - - $response = $mgmtAPI->roles()->getAll($body); - - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - - return $res[0] ?? null; - } + $res = auth0PagerToArray($mgmtAPI->roles->list(new ListRolesRequestParameters(['nameFilter' => $roleName, 'includeTotals' => true]))); - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); + return $res[0] ?? null; } /** @@ -482,15 +500,8 @@ function createRole($roleName) { global $settings; $mgmtAPI = getAuth0Management($settings); - $response = $mgmtAPI->roles()->create($roleName); - - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - - return $res; - } - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); + return auth0ToArray($mgmtAPI->roles->create(new CreateRoleRequestContent(['name' => $roleName]))); } /** @@ -504,18 +515,12 @@ function updateRole($roleId, $roleName, $roleDescription) { global $settings; $mgmtAPI = getAuth0Management($settings); - $response = $mgmtAPI->roles()->update($roleId, [ + + // https://auth0.com/docs/api/management/v2#!/Roles/post_roles + return auth0ToArray($mgmtAPI->roles->update($roleId, new UpdateRoleRequestContent([ 'name' => $roleName, 'description' => $roleDescription, - ]); - // https://auth0.com/docs/api/management/v2#!/Roles/post_roles - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - - return $res; - } - - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); + ]))); } /** @@ -533,22 +538,15 @@ function updateRolePermissions($roleId, $resourseServerIdentifier, $methods) $permissions = []; foreach ($methods as $method) { - $permissions[] = [ - 'resource_server_identifier' => $resourseServerIdentifier, - 'permission_name' => $method, - ]; + $permissions[] = new PermissionRequestPayload([ + 'resourceServerIdentifier' => $resourseServerIdentifier, + 'permissionName' => $method, + ]); } - $response = $mgmtAPI->roles()->addPermissions($roleId, $permissions); - if (HttpResponse::wasSuccessful($response, 201)) { - $res = HttpResponse::decodeContent($response); - - return $res; - } - - // If this fails with a 404, it's very likely that some of the submitted + // If this fails with a 404 (Auth0ApiException), it's very likely that some of the submitted // permissions are not actually registered as permissions in Auth0 - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); + $mgmtAPI->roles->permissions->add($roleId, new AddRolePermissionsRequestContent(['permissions' => $permissions])); } /** @@ -559,15 +557,7 @@ function getRoles() global $settings; $mgmtAPI = getAuth0Management($settings); - $response = $mgmtAPI->roles()->getAll(); - - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - - return $res; - } - - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); + return auth0PagerToArray($mgmtAPI->roles->list(new ListRolesRequestParameters(['includeTotals' => true]))); } /** @@ -586,19 +576,13 @@ function updateResources($resourseServerIdentifier, $methods) ]; foreach ($methods as $method) { - $body['scopes'][] = [ + $body['scopes'][] = new ResourceServerScope([ 'value' => $method, 'description' => $method, - ]; + ]); } - $response = $mgmtAPI->resourceServers()->update($resourseServerIdentifier, $body); - - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - } else { - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); - } + $mgmtAPI->resourceServers->update($resourseServerIdentifier, new UpdateResourceServerRequestContent($body)); } /** @@ -823,37 +807,22 @@ function assignRolesToUser($userId, array $roleIds) global $settings; $mgmtAPI = getAuth0Management($settings); // getting current roles for thr users - $response = $mgmtAPI->users()->getRoles($userId); + $res = auth0PagerToArray($mgmtAPI->users->roles->list($userId, new ListUserRolesRequestParameters(['includeTotals' => true]))); usleep(200000); - $removeRolesIds = []; - - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - // preprering the role ids to be removed - foreach ($res as $role) { - $removeRolesIds[] = $role['id']; - } - } else { - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); - } + // preprering the role ids to be removed + $removeRolesIds = array_column($res, 'id'); if (sizeof($removeRolesIds) > 0) { // removing current roles // https://auth0.com/docs/api/management/v2#!/Users/delete_user_roles - $response = $mgmtAPI->users()->removeRoles($userId, $removeRolesIds); - if (!HttpResponse::wasSuccessful($response, 204)) { - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); - } + $mgmtAPI->users->roles->delete($userId, new DeleteUserRolesRequestContent(['roles' => $removeRolesIds])); usleep(200000); } // assigning the new roles to the users - $response = $mgmtAPI->users()->addRoles($userId, $roleIds); // refer to docs: https://auth0.com/docs/api/management/v2#!/Users/post_user_roles - if (!HttpResponse::wasSuccessful($response, 204)) { - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); - } + $mgmtAPI->users->roles->assign($userId, new AssignUserRolesRequestContent(['roles' => $roleIds])); usleep(200000); } @@ -864,15 +833,8 @@ function getUserAssignedRoles(mixed $userId) { global $settings; $mgmtAPI = getAuth0Management($settings); - $response = $mgmtAPI->users()->getRoles('auth0|'.intval($userId)); - - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - return $res; - } - - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); + return auth0PagerToArray($mgmtAPI->users->roles->list('auth0|'.intval($userId), new ListUserRolesRequestParameters(['includeTotals' => true]))); } /** @@ -883,17 +845,5 @@ function getAllUsers(mixed $query) global $settings; $mgmtAPI = getAuth0Management($settings); - $params = [ - 'q' => $query, - ]; - - $response = $mgmtAPI->users()->getAll($params); - - if (HttpResponse::wasSuccessful($response)) { - $res = HttpResponse::decodeContent($response); - - return $res; - } - - throw new Exception($response->getReasonPhrase(), $response->getStatusCode()); + return auth0PagerToArray($mgmtAPI->users->list(new ListUsersRequestParameters(['q' => $query, 'includeTotals' => true]))); }