|
@@ 976-990 (lines=15) @@
|
| 973 |
|
* @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CreateAccount XML API Call documentation |
| 974 |
|
*/ |
| 975 |
|
|
| 976 |
|
public function createacct($acctconf) |
| 977 |
|
{ |
| 978 |
|
if (!is_array($acctconf)) { |
| 979 |
|
error_log("createacct requires that first parameter passed to it is an array"); |
| 980 |
|
|
| 981 |
|
return false; |
| 982 |
|
} |
| 983 |
|
if (!isset($acctconf['username']) || !isset($acctconf['password']) || !isset($acctconf['domain'])) { |
| 984 |
|
error_log("createacct requires that username, password & domain elements are in the array passed to it"); |
| 985 |
|
|
| 986 |
|
return false; |
| 987 |
|
} |
| 988 |
|
|
| 989 |
|
return $this->xmlapi_query('createacct', $acctconf); |
| 990 |
|
} |
| 991 |
|
|
| 992 |
|
/** |
| 993 |
|
* Change a cPanel Account's Password |
|
@@ 2393-2407 (lines=15) @@
|
| 2390 |
|
#### |
| 2391 |
|
|
| 2392 |
|
// This API2 function allows you to view the diskusage of a emailaccount. |
| 2393 |
|
public function getdiskusage($username, $args) |
| 2394 |
|
{ |
| 2395 |
|
if (!isset($username) || !isset($args)) { |
| 2396 |
|
error_log("getdiskusage requires that a username and args are passed to it"); |
| 2397 |
|
|
| 2398 |
|
return false; |
| 2399 |
|
} |
| 2400 |
|
if (is_array($args) && (!isset($args['domain']) || !isset($args['login']))) { |
| 2401 |
|
error_log("getdiskusage requires that args at least contains an email_domain and email_username"); |
| 2402 |
|
|
| 2403 |
|
return false; |
| 2404 |
|
} |
| 2405 |
|
|
| 2406 |
|
return $this->api2_query($username, 'Email', 'getdiskusage', $args); |
| 2407 |
|
} |
| 2408 |
|
|
| 2409 |
|
// This API2 function allows you to list ftp-users associated with a cPanel account including disk information. |
| 2410 |
|
public function listftpwithdisk($username) |