Skip to content
Snippets Groups Projects
Commit 4a34e61e authored by Marius Burkard's avatar Marius Burkard
Browse files

- handle insertion of client with invalid parent id

parent 7ae982fd
No related branches found
No related tags found
No related merge requests found
......@@ -171,11 +171,9 @@ class remoting_client extends remoting {
// check if this one is reseller
$check = $app->db->queryOneRecord('SELECT `limit_client` FROM `client` WHERE `client_id` = ?', intval($params['parent_client_id']));
if($check['limit_client'] == 0) {
throw new SoapFault('Invalid reseller', 'Selected client is not a reseller.');
return false;
}
if(isset($params['limit_client']) && $params['limit_client'] != 0) {
throw new SoapFault('Invalid reseller', 'Selected client is not a reseller. REMOVING PARENT_CLIENT_ID!!!');
$params['parent_client_id'] = 0;
} elseif(isset($params['limit_client']) && $params['limit_client'] != 0) {
throw new SoapFault('Invalid reseller', 'Reseller cannot be client of another reseller.');
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment