File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -893,6 +893,26 @@ public function client_get($session_id, $client_id)
893893 return $ app ->remoting_lib ->getDataRecord ($ client_id );
894894 }
895895
896+ public function client_get_id ($ session_id , $ sys_userid )
897+ {
898+ global $ app ;
899+ if (!$ this ->checkPerm ($ session_id , 'client_get ' )) {
900+ $ this ->server ->fault ('permission_denied ' , 'You do not have the permissions to access this function. ' );
901+ return false ;
902+ }
903+
904+ $ sys_userid = intval ($ sys_userid );
905+
906+ $ rec = $ app ->db ->queryOneRecord ("SELECT client_id FROM sys_user WHERE userid = " .$ sys_userid );
907+ if (isset ($ rec ['client_id ' ])) {
908+ return intval ($ rec ['client_id ' ]);
909+ } else {
910+ $ this ->server ->fault ('no_client_found ' , 'There is no sysuser account for this client ID. ' );
911+ return false ;
912+ }
913+
914+ }
915+
896916
897917 public function client_add ($ session_id , $ reseller_id , $ params )
898918 {
You can’t perform that action at this time.
0 commit comments