Skip to content

Commit bdbad50

Browse files
committed
Changed Commit #4061: The values for sys_userid and sys_groupid may not be empty.
1 parent fbe6a21 commit bdbad50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

interface/lib/classes/remoting_lib.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,9 +783,9 @@ function getSQL($record, $action = 'INSERT', $primary_id = 0, $sql_ext_where = '
783783
} else {
784784
if($primary_id != 0) {
785785
// update client permissions only if client_id > 0
786-
if($this->formDef['auth'] == 'yes' && $this->client_id > 0) {
787-
$sql_update .= '`sys_userid` = "'.$this->sys_userid.'", ';
788-
$sql_update .= '`sys_groupid` = "'.$this->sys_default_group.'", ';
786+
if($this->formDef['auth'] == 'yes' && $this->client_id > 0 && $this->sys_userid > 0 && $this->sys_default_group > 0) {
787+
$sql_update .= '`sys_userid` = '.$this->sys_userid.', ';
788+
$sql_update .= '`sys_groupid` = '.$this->sys_default_group.', ';
789789
}
790790
$sql_update = substr($sql_update,0,-2);
791791
$sql = "UPDATE ".$escape.$this->formDef['db_table'].$escape." SET ".$sql_update." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id;

0 commit comments

Comments
 (0)