KKerstjens
New member
Hi everyone,
I'm developing a Information System for internal use in a compnay with PHP(5.0.4). I want to create a user from this system to de DirectAdmin server.
I use the following command to create this user: CMD_API_ACCOUNT_USER
The code looks-like:
And the user has been created on the DirectAddmin server. But when i look in DirectAdmin is see the following information.
So as you can see, he doesn't get the right package ($package['list'][0]). $package['list'][0] gets his value of the following CMD command
And is filled with the package name. What he gets of DirectAdmin.
If I do print_r($arrtest) I see:
So the user is created, but with NO or the worng existing package.
Is this a bugs of the CMD_API_ACCOUNT_USER command, or did I forgot something.
I'm developing a Information System for internal use in a compnay with PHP(5.0.4). I want to create a user from this system to de DirectAdmin server.
I use the following command to create this user: CMD_API_ACCOUNT_USER
The code looks-like:
PHP:
$arrtest = array(
'action' => 'create',
'username' => 'bb2009',
'email' => $_POST['email'],
'passwd' => $_POST['passwd'],
'passwd2' => $_POST['passwd'],
'domain' => 'bb2009.mybb4you.nl',
'package' => $package['list'][0],
'ip' => $hostsettings['reseller_ip'],
'notify' => 'no'
);
print_r($arrtest);
$sock->query('/CMD_API_ACCOUNT_USER', $arrtest );
And the user has been created on the DirectAddmin server. But when i look in DirectAdmin is see the following information.
Name Bandwidth Disk Usage # of Domains Suspended IP Domain(s)
bb2009 0.0 / 0.0 0.0 / 0.0 1 / 0 No 193.43.150.243 bb2009.mybb4you.nl
So as you can see, he doesn't get the right package ($package['list'][0]). $package['list'][0] gets his value of the following CMD command
PHP:
$sock->query('/CMD_API_PACKAGES_USER');
$package = $sock->fetch_parsed_body();
And is filled with the package name. What he gets of DirectAdmin.
If I do print_r($arrtest) I see:
PHP:
Array
(
[action] => create
[username] => bb2009
[email] => [email][email protected][/email]
[passwd] => edr3F5d
[passwd2] => edr3F5d
[domain] => bb2009.mybb4you.nl
[package] => 20mbpackage
[ip] => xxx.xxx.xxx.xxx
[notify] => no
)
So the user is created, but with NO or the worng existing package.
Is this a bugs of the CMD_API_ACCOUNT_USER command, or did I forgot something.