Limits are not working for custom user

m4tt

New member
Joined
Apr 19, 2020
Messages
4
Hi Guys,

I'm trying to create a custom user via API using command "CMD_API_ACCOUNT_USER". A new account is created but without specific limits. Everything for some reason is set to unlimited. Any idea why?

As far as I can see here https://www.directadmin.com/api.php I've set everything correctly -

This is what I'm sending:

PHP:
'action' => 'create',
'add' => 'Submit',
'username' => 'm4tt',
'email' => 'test2@example.com',
'passwd' => 'PasswordIsHere',
'passwd2' => 'PasswordIsHere',
'domain' => 'example.com',
'bandwidth' => '10240',
'ubandwidth' => 'OFF',
'quota' => '512000',
'uquota' => 'OFF',
'inode' => '0',
'uinode' => 'ON',
'vdomains' => '10',
'uvdomains' => 'OFF',
'nsubdomains' => '10',
'unsubdomains' => 'OFF',
'nemails' => '10',
'unemails' => 'OFF',
'nemailf' => '10',
'unemailf' => 'OFF',
'nemailml' => '10',
'unemailml' => 'OFF',
'nemailr' => '10',
'unemailr' => 'OFF',
'mysql' => '10',
'umysql' => 'OFF',
'domainptr' => '10',
'udomainptr' => 'OFF',
'ftp' => '10',
'uftp' => 'OFF',
'aftp' => 'OFF',
'cgi' => 'ON',
'php' => 'ON',
'spam' => 'ON',
'cron' => 'OFF',
'catchall' => 'OFF',
'ssl' => 'ON',
'ssh' => 'OFF',
'sysinfo' => 'OFF',
'login_keys' => 'OFF',
'dnscontrol' => 'ON',
'suspend_at_limit' => 'OFF',
'skin' => 'evolution',
'language' => 'en',
'ip' => '[Server_IP_Address]',
'notify' => 'no'
 

m4tt

New member
Joined
Apr 19, 2020
Messages
4
I found something intresting...

If I will send a request without "ubandwidth" the account is created with a correct limit. I don't really understund why. The API documentation says:

ubandwidthON or OFF. If ON, bandwidth is ignored and no limit is set

and I was sending 'OFF' - so in theory I should not get unlimited bandwidth...
 
Top