Documentation
User command
Table of Contents ▼
Presentation
This command manages users registered in the database.
It is compatible with the Auth controller/plugin, the Auth attribute and the Api plugin.
Add a user
$ bin/comma User add --email=string [--name=string] [--roles=string] [--services=string]
Parameters:
- email: (mandatory) User's email address.
- name: (optional) User name.
- roles: (optional) String containing comma-separated list of user roles (e.g. 'writer,reviewer').
- services: (optional) String containing comma-separated list of services the user can access (e.g. 'text,images').
Delete a user
$ bin/comma User remove [--id=id] [--email=string]
Parameters:
- id: (optional) Identifier of the user to be removed.
- email: (optional) Mail address of the user to be removed.
One of the two parameters (id or email) must be supplied. If both parameters are supplied, the id takes precedence.
List users
This command allows you to list users. If no options are given, all users will be displayed. Depending on the options supplied, the list will be filtered.
$ bin/comma User list [--email=string] [--name=string] [--role=string] [--service=string] [--dateCreationFrom=string] [--dateCreationTo=string] [--dateLastLoginFrom=string] [--dateLastLoginTo=string] [--dateLastAccessFrom=string] [--dateLastAccessTo=string]
Parameters:
- email: (optional) Mail address prefix.
- name: (optional) User name prefix.
- role: (optional) Role users must have.
- service: (optional) Service to which users must have access.
- dateCreationFrom: (optional) Minimum user creation date (format YYYY-MM-DD).
- dateCreationTo: (optional) Maximum user creation date (format YYYY-MM-DD).
- dateLastLoginFrom: (optional) Minimum date of last user authentication (format YYYY-MM-DD).
- dateLastLoginTo: (optional) Maximum date of last user authentication (format YYYY-MM-DD).
- dateLastAccessFrom: (optional) Minimum date of last user access (format YYYY-MM-DD).
- dateLastAccessTo: (optional) Maximum date of last user access (format YYYY-MM-DD).
Previous: | Cache command helper |
Next: | Auth controller helper |
Table of Contents
- Migration : How to upgrade from Temma 1.x to version 2
- Installation : Download Temma and install it to start your web project
- Configuration : All the configuration directives of the etc/temma.json file and the optional environment variables
- External libraries : How to use external function libraries
- Routing : Temma's default routing system, and advanced routing
- Log : Use of the log system, management by criticality levels
- Controllers : Essential parts of your web application
- Views : Smarty templates or JSON/CSV/RSS/iCal/INI exports
- Dependency injection : The backbone of your application developments
- Sessions : Extension of user sessions managed by PHP
- Data sources : Unified data access management
- Model : How to use DAOs to access databases
- Execution flow : How to manage the execution flow, between plugins and the controller
- Plugins : How to use plugins, and create your own plugins to modularize your code
- Attributes : How to filter access to controllers and actions
- Tests : To write automated integration tests.
- Command-line interface : To create executable scripts on the command line, automatically initialized by Temma
-
Helpers :
Items offered by Temma to help you in various circumstances
- Command-line scripts
-
Controller + plugin
- Auth : Controller and plugin to manage user authentication
- Plugins
- Attributes
-
Smarty plugins
- urlize : Modifier to transform a text into an URL
- filenamize : Modifier to transform a text into a file name
- nbsp : Modifier to transform spaces into non-breakable spaces
-
Utility objects
- ANSI : To format texts written to standard output
- BaseConvert : To do digital base conversions
- DataFilter : To filter and validate data
- Email : To send emails
- HTMLCleaner : To clean up an HTML stream coming from a WYSIWYG editor
- IniExport : To export data in INI format
- Json : To read JSON streams that may contain comments
- Lock : To lock access to a file, or the execution of the current PHP script
- Registry : To properly store global variables
- Smarty : To process Smarty templates outside the view
- Term : Terminal management (TTY)
- Text : Different treatments on character strings
- Timer : To manage stopwatches