Description

This function validates a system user for use on the target server.


For more information about how this function works with other functions in the transfer and restore process, read our Guide to Transfer and Restore API Functions documentation.


Examples 





https://hostname.example.com:2087/cpsess##########/json-api/validate_system_user?api.version=1&user=username





https://hostname.example.com:2087/cpsess##########/xml-api/validate_system_user?api.version=1&user=username




whmapi1 validate_system_user user=username




{
  "data": {
    "valid_for_transfer": 1,
    "reserved": 1,
    "exists": 1,
    "valid_for_new": 1
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "validate_system_user"
  }
}





<result>
    <data>
        <valid_for_transfer>1</valid_for_transfer>
        <reserved>1</reserved>
        <exists>1</exists>
        <valid_for_new>1</valid_for_new>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>validate_system_user</command>
    </metadata>
</result>



   

Parameters

ParameterTypeDescriptionPossible valuesExample
user
string

Required

The system username.

A valid username.
username

Returns

ReturnTypeDescriptionPossible valuesExample

valid_for_transfer

BooleanWhether the username is valid for a transferred account, but not a new account.
  • 1 — Valid for transfer, but not a new account.
  • 0 — Invalid.
1
reservedBooleanWhether the username is reserved.
  • 1 — Reserved.
  • 0Not reserved.
1
existsBooleanWhether the username exists on the server.
  • 1 — Exists.
  • 0 — Does not exist.
1
valid_for_newBooleanWhether the system can use the username to create a new account.
  • 1 — Usable.
  • 0 — Unusable.
1