Description
This function lists user data for a domain.
Note:
This function retrieves data from the /var/cpanel/userdata/user/domain
file, where user
represents the cPanel account username and domain
represents the domain. For this reason, actual output may not contain all of the return parameters.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
domain |
string |
Required The domain. |
A domain on the cPanel account. |
example.com |
Returns
Return |
Type |
Description |
Possible values |
Example |
phpopenbasedirprotect |
boolean |
The domain's PHP open_basedir Tweaksetting. |
|
1 |
ip |
string |
The domain's IP address. |
An IP address. |
192.168.0.128
|
domain |
string |
The domain name. |
A valid domain on the cPanel account. |
example.com |
usecanonicalname |
string |
The domain's Canonical Name (CNAME) setting. |
|
Off |
group |
string |
The domain's group. |
A group name. |
user |
hascgi |
boolean |
Whether CGI is enabled for the domain. |
|
1 |
user |
string |
The cPanel account's username. |
The cPanel account's username. |
user |
documentroot |
string |
The path to the domain's document root. |
The absolute path to the domain's document root. |
/home/user/public_html/example.com |
owner |
string |
The cPanel account's owner. |
The WHM account (rootor a reseller) that owns the cPanel account. |
root |
userdirprotect |
boolean |
The domain's Apache mod_userdir Tweaksetting. |
|
1 |
ipv6 |
string |
The domain's IPv6 address. |
|
2001:db8:28a0:2004:227:eff:fe1d:f770 |
serveralias |
string |
A list of the domain's aliases. |
A space-separated list of the domain's aliases. |
seconddomain.com www.seconddomain.com www.seconddomain.example.com |
homedir |
string |
The path to the account's home directory. |
The absolute path to the account's home directory. |
/home/user |
servername |
string |
The domain's identifier on the server. |
The domain's identifier on the server. |
seconddomain.example.com |
type |
string |
The domain type. |
|
addon_domain |
serveradmin |
string |
The domain's administrator's contact email address. |
A valid email address. |
webmaster@seconddomain.example.com |
no_cache_update |
boolean |
Whether the domain is subject to cache updates. |
|
1 |
customlog |
hash |
A hash of Apache log information. |
This hash contains thetarget and domainparameters. |
|
target |
string |
The absolute path to the domain's log file. The function returns this parameter in thecustomlog hash. |
The absolute path to a location in the server'sdomlogs directory. |
/usr/local/apache/domlogs/example.com |
domain |
string |
The target log file's domain. The function returns this parameter in thecustomlog hash. |
An Apache log domain. Generally, this value iscombined. |
combined |
scriptalias |
hash |
A hash of CGI information. |
This hash contains theurl and pathparameters. |
|
url |
string |
The domain's CGI directory. The function returns this parameter in thescriptalias hash. |
The domain's CGI directory name. |
/cgi-bin/ |
path |
string |
The path to the domain's CGI directory. The function returns this parameter in thescriptalias hash. |
The absolute path to the domain's CGI directory. |
/home/user/public_html/cgi-bin |