Resource functions
Collection functions
Search functions
IIIF
Metadata functions
User functions
System
Message functions
Plugin functions

save_user

Save a user record

Variable Description Data type Default value
$ref The user ID string N/A
$data

JSON array defining data to save

For example:
{
"fullname": "John Smith",
"approved": "1",
"password":"dyn0Aami1!te"
}

Possible parameters are:

  • username
  • password
  • fullname
  • email
  • usergroup (numeric ID)
  • ip_restrict
  • search_filter_override
  • search_filter_o_id
  • comments
  • suggest
  • emailresetlink
  • approved (0 or 1)
  • expires
string N/A

Response

If successful, a 200 HTTP status will be returned, otherwise 409 HTTP status with a payload message describing the issue.

Examples

Successfully saved (HTTP status - 200):

Array
(
    [status] => success
    [data] => null
)

Missing full name (HTTP status - 409):

Array
(
    "status": "fail",
    "data": {
        "message": "You must complete the full name field"
    }
)