exp:expuserlist
List user accounts: filter by state (enabled, disabled, unactivated, pending, locked, never signed in, inactive ...), group and search, with paging.
Script bin/php/expuserlist.php, code in kernel/private/classes/commands/expuserlist.php. Run it from the installation root, as the user the web server runs as:
./console exp:expuserlist --help
./console exp:user:list --help
php bin/php/expuserlist.php --helpHelp text
List user accounts
Lists the accounts with their id, login, e-mail address, last visit, state and main group, the
same list as Users > Hygiene in the administration. Filter by state, by group (its members at
any depth) and by a text in the login, name or e-mail address; page with --limit and --offset.
Changes nothing.
./console exp:user:list
./console exp:user:list --state=disabled --group=Editors
./console exp:user:list --state=inactive --days=365 --sort=last_visit
./console exp:user:list --search=example.com --limit=100 --offset=100 --format=jsonOptions
| Option | Value | Help |
|---|---|---|
--state | required | Only accounts in this state: all (default), enabled, disabled, unactivated, pending, locked, never, inactive, orphaned, duplicate_login or duplicate_email |
--group | required | A 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) |
--search | required | Only accounts whose login, name or e-mail address contains this text |
--days | required | With --state=inactive: not signed in for this many days (default 180) |
--sort | required | The order: name (default), login, email, last_visit, login_count or id |
--order | required | asc (default) or desc |
--limit | required | How many to list (default 25, at most 500); bulk: the most accounts one run may change (default 500, at most 5000) |
--offset | required | Skip this many first (the next page: --offset=25) |
--format | required | text (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 ...).
Related
Generated by ./console exp:help:examples from bin/php/expuserlist.php, kernel/private/classes/commands/expuserlist.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.