# Return current user's account name

This function returns the provided value. This function works with other functions to display form data within a user interface.

Note:

  If you call this function from a Webmail session URL, the system will only access data for that email account.

Important:

  When you disable the Receive Mail role, the system disables this function.

Endpoint: GET /Email/account_name
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `account` (string)
    The function will return this value in the data return. If you do not include this parameter, the function returns All Mail On The Account or a blank value.
* A valid string.
* An empty value.

Note:

 The function does not validate this parameter's value.
    Example: "user"

  - `display` (string)
    Include this parameter to cause the function to return All Mail On The Account if the account parameter is blank or does not exist. If you do not include this parameter and the account value is blank or does not exist, the function returns a blank data value.
    Example: "any_value"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "account_name"

  - `module` (string)
    The name of the module called.
    Example: "Email"

  - `result` (object)

  - `result.data` (string)
    The account parameter's value.
* A valid string.
* All Mail On The Account
* An empty value.
    Example: "user@example.com"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


