When I update a user's configuration, I used the following code:
$sock->set_method('POST');
$sock->query('/CMD_API_MODIFY_USER',
array(
'action' => 'customize',
'user' => "$cpusername",
'bandwidth' => "$whBan",
'ubandwidth' => "$uBan",
'quota' => "$whDis",
'uquota' => "$uDis",
'vdomains' => "$whDom",
'uvdomains' => "$uDom",
'nemails' => "$whEml",
'unemails' => "$uEml",
'mysql' => "$whSql",
'umysql' => "$uSql",
'ftp' => "$whFtp",
'uftp' => "$uFtp",
'package' => "$backend"
));
Those $wh are $_POST variables.
Then I have made a if else condition (if diskspace = 0, $uDis = "ON")
so in case of I want to give unlimited diskspace, it should finally set to unlimited.
But it didn't go like plan.
If something is set to ON, everything will be ON (that means all settings will be changed to unlimited)
I have tried to separate them to query twice but the same result.
Was my code's problem?
$sock->set_method('POST');
$sock->query('/CMD_API_MODIFY_USER',
array(
'action' => 'customize',
'user' => "$cpusername",
'bandwidth' => "$whBan",
'ubandwidth' => "$uBan",
'quota' => "$whDis",
'uquota' => "$uDis",
'vdomains' => "$whDom",
'uvdomains' => "$uDom",
'nemails' => "$whEml",
'unemails' => "$uEml",
'mysql' => "$whSql",
'umysql' => "$uSql",
'ftp' => "$whFtp",
'uftp' => "$uFtp",
'package' => "$backend"
));
Those $wh are $_POST variables.
Then I have made a if else condition (if diskspace = 0, $uDis = "ON")
so in case of I want to give unlimited diskspace, it should finally set to unlimited.
But it didn't go like plan.
If something is set to ON, everything will be ON (that means all settings will be changed to unlimited)
I have tried to separate them to query twice but the same result.
Was my code's problem?