Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expuserexport

Export the accounts the list filters select as CSV or JSON: login, e-mail, names, state, groups, last visit (never a password or its hash).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/expuserexport.md

On this page

exp:expuserexport

Export the accounts the list filters select as CSV or JSON: login, e-mail, names, state, groups, last visit (never a password or its hash).

Script bin/php/expuserexport.php, code in kernel/private/classes/commands/expuserexport.php. Run it from the installation root, as the user the web server runs as:

./console exp:expuserexport --help
./console exp:user:export --help
php bin/php/expuserexport.php --help

Help text

Export accounts
Writes the accounts the filters of exp:user:list select, as CSV (a header line, cells that a
spreadsheet would run as formulas made safe) or JSON (an array of objects): id, login, email,
first_name, last_name, name, enabled, states, groups (node ids separated by |), main_group,
last_visit, login_count. Never a password or a password hash. To standard output, or with --output
to a new file of mode 0600 (then the command prints a report). The file holds personal data:
keep it as such. exp:user:import reads the same columns.

./console exp:user:export > users.csv
./console exp:user:export --group=Members --state=enabled --output=var/members.csv
./console exp:user:export --state=inactive --days=365 --type=json --output=var/inactive.json

Options

OptionValueHelp
--staterequiredOnly accounts in this state: all (default), enabled, disabled, unactivated, pending, locked, never, inactive, orphaned, duplicate_login or duplicate_email
--grouprequiredA user group by node id or name: list, export and bulk take only its members (below it, at any depth); create and import: the group of the new accounts (repeat for more, the first is the main group; default [UserSettings] DefaultUserPlacement)
--searchrequiredOnly accounts whose login, name or e-mail address contains this text
--daysrequiredWith --state=inactive: not signed in for this many days (default 180)
--typerequiredThe file type: csv (default) or json; import reads it from the file name when not given
--outputrequiredWrite the export to this file (new, mode 0600) instead of standard output
--formatrequiredtext (default) or json (the machine output exp-user/1)

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/expuserexport.php, kernel/private/classes/commands/expuserexport.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x