Controller: Users

API Controller /siteworx/users
Required Permissions ["USERS"]
Action Description
activate Activates a SiteWorx user.
add Add a siteworx user.
deactivate Deactivates (but does not delete) a SiteWorx user.
delete Delete a siteworx user.
edit Edit a siteworx user.
list List SiteWorx users. DEPRECATED in version 4.8.0-393
listDeletable List deletable SiteWorx users.
listEditable List editable SiteWorx users.
listMasterUser Get details of the working user.
listUsers List SiteWorx users.
listWorkingUser Get details of the working user.

Action: activate (Added in version 4.8.0-393)

Activates a SiteWorx user.

Input Parameters

Name Type Notes Required?
user struct (string)
Example Values
second@interworx.com
Yes

Action: add

Add a siteworx user.

Input Parameters

Name Type Notes Required?
nickname string No
email string Yes
encrypted string
Description
"y" if the password is ALREADY encrypted, "n" if the password is not yet encrypted. Default: n
Example Values
y, n
Example Default Value
n
No*
password string Yes
confirm_password string
Help Entry
Confirm the password field by providing it again. Must match the password provided.
Yes
language string
Example Values
cs, en-us, fr, de, hu, it, pl, pt, sk, es, sv, tr
Example Default Value
en-us
No*
menu_style string
Example Values
big, small
Example Default Value
small
No*
perms struct (string)
Example Values
RUBYONRAILS, LOGIN, EMAIL, STATS, FTP, LOGS, MYSQL, BACKUP, SUBDOMAINS, PREFERENCES, USERS, FILEMANAGER, POINTERDOMS, CRONTAB, SSL, HTACCESS, SLAVEDOMS, DNS, simplescripts
No
* indicates that it's actually required, but probably already has a valid default value

Action: deactivate (Added in version 4.8.0-393)

Deactivates (but does not delete) a SiteWorx user.

Input Parameters

Name Type Notes Required?
user struct (string)
Example Values
second@interworx.com
Yes

Action: delete

Delete a siteworx user.

Input Parameters

Name Type Notes Required?
user struct (string)
Example Values
second@interworx.com
Yes

Action: edit

Edit a siteworx user.

Input Parameters

Name Type Notes Required?
user string
Example Values
user@example.com, second@interworx.com
Yes
nickname string
Example Default Value
Example User
No
email string
Example Default Value
user@example.com
No*
language string
Example Values
cs, en-us, fr, de, hu, it, pl, pt, sk, es, sv, tr
Example Default Value
en-us
No*
menu_style string
Example Values
big, small
Example Default Value
small
No*
encrypted string
Description
"y" if the password is ALREADY encrypted, "n" if the password is not yet encrypted. Default: n
Example Values
y, n
Example Default Value
n
No*
password string No
confirm_password string
Help Entry
Confirm the password field by providing it again. Must match the password provided.
No
* indicates that it's actually required, but probably already has a valid default value

Action: list (Added in version 4.6.0-323)

This action has been deprecated as of version 4.8.0-393.

MESSAGE: 2011-01-27 use ListUsersAction

List SiteWorx users.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      0 => 'user@example.com',
      1 => 'Example User (user@example.com)',
    ),
    1 => 
    array (
      0 => 'second@interworx.com',
      1 => 'NW Secondary User (second@interworx.com)',
    ),
  ),
)

Action: listDeletable (Added in version 4.6.0-323)

List deletable SiteWorx users.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      0 => 'second@interworx.com',
      1 => 'NW Secondary User (second@interworx.com)',
    ),
  ),
)

Action: listEditable (Added in version 4.6.0-323)

List editable SiteWorx users.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      0 => 'user@example.com',
      1 => 'Example User (user@example.com)',
    ),
    1 => 
    array (
      0 => 'second@interworx.com',
      1 => 'NW Secondary User (second@interworx.com)',
    ),
  ),
)

Action: listMasterUser

Get details of the working user.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    'userid' => 148,
    'nickname' => 'Example User',
    'email' => 'user@example.com',
    'ismaster' => true,
    'status' => 'active',
    'language' => 'en-us',
    'theme' => 'interworx',
    'menu_style' => 'small',
    'perms' => 
    array (
      0 => 'MASTER',
    ),
  ),
)

Action: listUsers (Added in version 4.8.0-393)

List SiteWorx users.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'global_uid' => 'sw148',
      'email' => 'user@example.com',
      'nickname' => 'Example User',
      'language' => 'en-us',
      'user_status' => 'active',
      'type' => 'master',
    ),
    1 => 
    array (
      'global_uid' => 'sw149',
      'email' => 'second@interworx.com',
      'nickname' => 'NW Secondary User',
      'language' => 'en-us',
      'user_status' => 'active',
      'type' => 'slave',
    ),
  ),
)

Action: listWorkingUser

Get details of the working user.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    'userid' => 148,
    'nickname' => 'Example User',
    'email' => 'user@example.com',
    'ismaster' => true,
    'status' => 'active',
    'language' => 'en-us',
    'theme' => 'interworx',
    'menu_style' => 'small',
    'perms' => 
    array (
      0 => 'MASTER',
    ),
  ),
)