Create an activated user, optionally assigning to group
./create-user 'Real Name' email user_name group_id password
The following environment variables need to be set
DISCOURSE_URL=https://yourdiscoursesite.com
DISCOURSE_API_KEY="get from yourdiscoursesite.com/admin/api/keys"
DISCOURSE_API_USER=system
DISCOURSE_PASSWORD="Thisisstrangelysafepassword"
The script will read these values from CREATE_USER_DEFAULTS
, probably deleting them if you set them elsewhere, arguably a bug.
Get your API key from https://yoursite/admin/api/keys
To find the group ID, see https://yourdiscoursesite.com/admin/groups.json. A tool like Chrome's JSONView or similarly-named JSONView for Chrome will make it easier to read JSON files in your browser.
TODO: Should check to see whether the user actually got created.