Hello,
I can't remove the account using xml-api, however
creating the account works fine.
My code:
But I always getPHP Code:$params = array(
'user' => 'wat18848',
);
$config = array(
'config' => array(
'host' => $this->_config['host'],
'user' => $this->_config['username'],
'password' => $this->_config['password'],
),
);
$cmd = 'removeacct';
$xmlapi = new Cpanel_Service_WHM($config);
$result = $xmlapi->$cmd($params)->getResponse('array');
However, if I run this command directly from cpanel like this:Code:Array ( [result] => Array ( [0] => Array ( [status] => 0 [statusmsg] => No user specified [rawout] => ) ) )
https://<host>/cpsess7719510149/xml-api/removeacct?user=<userid>
It removes the account.
So what am I doing wrong?



LinkBack URL
About LinkBacks
Reply With Quote
). However, you might consider creating your object using the PublicAPI class since it abstracts both that class and the Cpanel_Service_cPanel...just a suggestion...you know what's best for your application 





