List users
Lists the code and name of all users of the organisation.
list() fetches all Finder pages and returns UserSummary objects (code and name). Use get() for all settings of a user.
Users belong to the organisation, not to a company, but Twinfield refuses user requests without a company (error 359). Any company works, so Example::twinfield() (a client with your default company) is enough.
$twinfield = Example::twinfield();
foreach ($twinfield->users()->list() as $user) { echo str_pad($user->code, 16), ' ', $user->name, PHP_EOL;}php examples/users/list-users/example.phpADMIN Example AdminAPI API userJDOE John DoeJDOE_AI John Doe (AI)JSMITH Jane SmithSource
Section titled “Source”View examples/users/list-users/example.php on GitHub.
Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.