Having Trouble with CMD_API_ACCOUNT_USER

ryant

Verified User
Joined
Jul 28, 2005
Messages
15
I'm having some trouble with CMD_API_ACCOUNT_USER. Seems no matter what I try it still assigns "unlimited" values and doesn't recognize the ON OFF states.

Any ideas?


PHP:
	$socket = new HTTPSocket;
	$socket->connect($server,"$daPort");
	$socket->set_login("$daUsername","$daPasswd");
	$socket->set_method('POST');
	// {admin_username} and {admin_password} are not specifically your administrative DA user,
	// but rather the user that you want to own this new user.
	$socket->query('/CMD_API_ACCOUNT_USER',
	array(
	'username' => $db[userName],
	'email' => $db[email],
	'passwd' => 'abc123',
	'passwd2' => 'abc123',
	'domain' => $db[domainName],
	'bandwidth' => $db[bandwidth],
	'ubandwidth' => 'OFF',
	'quota' => $db[webspace],
	'uquota' => 'OFF',
	'vdomains' => $db[domains],
	'uvdomains' => 'OFF',
	'nsubdomains' => '10',
	'unsubdomains' => 'OFF',
	'ips' => '1',
	'nemails' => $db[emailaccts],
	'unemails' => 'OFF',
	'nemailf' => '0',
	'unemailf' => 'ON',
	'nemailml' => '0',
	'unemailml' => 'OFF',
	'nemailr' => '0',
	'unemailr' => 'OFF',
	'mysql' => $db[mysql],
	'umysql' => 'OFF',
	'domainptr' => '0',
	'udomainptr' => 'OFF',
	'ftp' => '0',
	'uftp' => 'ON',
	'aftp' => 'OFF',
	'cgi' => 'ON',
	'ssl' => 'OFF',
	'ssh' => 'OFF',
	'php' => 'ON',
	'cron' => 'OFF',
	'sysinfo' => 'OFF',
	'suspend_at_limit' => 'ON',
	'skin' => 'enhanced',
	'spam' => 'YES',
	'dnscontrol' => 'ON',
	'dns' => 'OFF',
	'ip' => $ipaddress,
	'add' => 'Submit',
	'action' => 'create',
	'notify' => 'YES'
	));
 
Be shure you remove the:

'bandwidth' => $db[bandwidth],

and

'quota' => $db[webspace],


else it wont work.


User bandwidth OR ubandwidth, not both.
 
just thought I'd paste in the email response I received:

Hello,

The "uvalue=ON" is a checkbox. This means that for a webbrowser, if it's not checked, the value isn't passed at all.
Try not passing "uvalue" at all (not uvalue=OFF, but just don't pass it).

Thank you,

John
 
Back
Top