diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index 5186c3c2d60f34f7b7ee989cb0bae9ff9b8a2b22..510c7267d9ce8e7bf19c5a7b8b056c064eac3fd1 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -783,9 +783,9 @@ class remoting_lib { } else { if($primary_id != 0) { // update client permissions only if client_id > 0 - if($this->formDef['auth'] == 'yes' && $this->client_id > 0) { - $sql_update .= '`sys_userid` = "'.$this->sys_userid.'", '; - $sql_update .= '`sys_groupid` = "'.$this->sys_default_group.'", '; + if($this->formDef['auth'] == 'yes' && $this->client_id > 0 && $this->sys_userid > 0 && $this->sys_default_group > 0) { + $sql_update .= '`sys_userid` = '.$this->sys_userid.', '; + $sql_update .= '`sys_groupid` = '.$this->sys_default_group.', '; } $sql_update = substr($sql_update,0,-2); $sql = "UPDATE ".$escape.$this->formDef['db_table'].$escape." SET ".$sql_update." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id;