Skip to content
Snippets Groups Projects
Commit 770b83bc authored by tbrehm's avatar tbrehm
Browse files

Added a function to retrieve the client_id for a given sysuser_id to the...

Added a function to retrieve the client_id for a given sysuser_id to the remotting API: client_get_id($session_id,$sys_userid);
parent 4787bc12
No related branches found
No related tags found
No related merge requests found
......@@ -893,6 +893,26 @@ class remoting {
return $app->remoting_lib->getDataRecord($client_id);
}
public function client_get_id($session_id, $sys_userid)
{
global $app;
if(!$this->checkPerm($session_id, 'client_get')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$sys_userid = intval($sys_userid);
$rec = $app->db->queryOneRecord("SELECT client_id FROM sys_user WHERE userid = ".$sys_userid);
if(isset($rec['client_id'])) {
return intval($rec['client_id']);
} else {
$this->server->fault('no_client_found', 'There is no sysuser account for this client ID.');
return false;
}
}
public function client_add($session_id, $reseller_id, $params)
{
......
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