Loading...
 
Skip to main content

History: Users Handler

Source of version: 12 (current)

Copy to clipboard
            This ((handler)) is for creating new users into Tiki in an automated way, or adding existing users to groups in a simple way.
__Creating users in this was may not be secure. Don't use it in a production server. It may change radically in the future and thus, consider it experimental and you will likely need to adapt to changes in the code and/or syntax.__.

{REMARKSBOX(title="Notes for changes in Tiki 6" type="info")}
* Previously each user was -+type: users+-, now you can (additionally) use -+type: user+-
* Email can be set and "must change password on first login" enabled on user creation
{REMARKSBOX}
! Complete example

{CODE(caption=>YAML)}
objects:
 -
  type: user
  data: 
    name: aldo
    pass: whatever
    groups: [ group1 ]
 -
  type: user
  data: 
    name: ben
    pass: b-boy
 -
  type: user
  data: 
    name: xavi
 -
  type: users
  data: 
    name: marc
    email: marc@example.com
    change: n
    groups: [ group2 ]
{CODE}

! Options
||__Field Name__|__Mandatory__|__Value__
name | y | Username
pass | | If no pass is provided, then the pass will be the username
email | | User's email (no validation message yet)
groups | | User will be assigned to the group or groups listed. If the group doesn't exist previously,the handler will not currently create it (use the ((Group Handler)) to create groups).
||

This doesn't work in Tiki9: "change: User must change password on first login (y/n default: y) ". Maybe it worked at one time or needs another setting, but proven broken for ((CartoGraf)).