Description

This function lists a Logaholic user's profiles.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Logaholic&cpanel_jsonapi_func=listuserprofiles&username=example

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List profiles for Logaholic user "example"
$list_profiles = $cpanel->api2(
    'Logaholic', 'listuserprofiles', 
    array(
        'username'       => 'example', 
    ) 
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# List profiles for Logaholic user "example"
my $list_profiles = $cpliveapi->api2(
    'Logaholic', 'listuserprofiles',
    { 
        'username'       => 'example', 
    }
);

 

Because we removed this function before we introduced this functionality, you cannot call this function via the command line. 

{
  "cpanelresult": {
    "apiversion": 2,
    "func": "listuserprofiles",
    "data": [
      {
        "reason": "The Logaholic user "example" has 1 profile.",
        "result": 1,
        "profiles": {
          "profile": [
            "subdomain.example.com"
          ]
        }
      }
    ],
    "event": {
      "result": 1
    },
    "module": "Logaholic"
  }
}

   

Parameters

ReturnTypeDescriptionPossible valuesExample
usernamestring

Required

The Logaholic username.

A valid string.example

Returns

ReturnTypeDescriptionPossible valuesExample
reason string

The status message from the function.

  • The Logaholic user "example" has 1 profile.
  • “example” does not own the user “user”.
The Logaholic user "example" exists.
resultBoolean Whether the function succeeded.
  • 1 — The function succeeded.
  • 0 — The function failed.
1
profileshash

A hash that contains a list of Logaholic user profiles.

 

This hash includes the profile return. 

profile

string

The name of the Logaholic user's profile.

This function returns this value in the profiles hash.

A valid string.
subdomain.example.com
reasonstring

A reason for failure.

This function only returns a reason value if it failed.

A string that describes the error.

This is an error message.
resultBoolean

Whether the function succeeded.

  • 1 — The function succeeded.
  • 0 — The function failed.
1