|
|
@@ -91,6 +91,9 @@ class cwp7_Admin {
|
|
|
* @return array of account informations or error message
|
|
|
*/
|
|
|
public function createAccount($params) {
|
|
|
+ if(!isset($params['package'])) {
|
|
|
+ return array('error_msg' => 'Error: missing parameter package');
|
|
|
+ }
|
|
|
if(!isset($params['domain'])) {
|
|
|
return array('error_msg' => 'Error: missing parameter domain');
|
|
|
}
|
|
|
@@ -103,8 +106,17 @@ class cwp7_Admin {
|
|
|
if(!isset($params['email'])) {
|
|
|
return array('error_msg' => 'Error: missing parameter email');
|
|
|
}
|
|
|
- if(!isset($params['package'])) {
|
|
|
- return array('error_msg' => 'Error: missing parameter package');
|
|
|
+ if(!isset($params['inode'])) {
|
|
|
+ return array('error_msg' => 'Error: missing parameter inode');
|
|
|
+ }
|
|
|
+ if(!isset($params['nofile'])) {
|
|
|
+ return array('error_msg' => 'Error: missing parameter nofile');
|
|
|
+ }
|
|
|
+ if(!isset($params['nproc'])) {
|
|
|
+ return array('error_msg' => 'Error: missing parameter nproc');
|
|
|
+ }
|
|
|
+ if(!isset($params['server_ips'])) {
|
|
|
+ return array('error_msg' => 'Error: missing parameter server_ips');
|
|
|
}
|
|
|
if(!isset($params['autossl'])) {
|
|
|
$params['autossl'] = 0;
|
|
|
@@ -119,8 +131,8 @@ class cwp7_Admin {
|
|
|
'autossl' => $params['autossl'],
|
|
|
'encodepass' => true,
|
|
|
'inode' => $params['inode'],
|
|
|
- 'nofile' => $params['nofile'],
|
|
|
- 'nproc' => $params['nproc'],
|
|
|
+ 'limit_nofile' => $params['nofile'],
|
|
|
+ 'limit_nproc' => $params['nproc'],
|
|
|
'server_ips' => $params['server_ips'],
|
|
|
);
|
|
|
return $this->doRequest('account', 'add', $data);
|