From bdbad50c83d649f89264c2a388bbd40f8fe9d781 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 30 Jul 2013 03:36:55 -0400
Subject: [PATCH] Changed Commit #4061: The values for sys_userid and sys_groupid may not be empty.

---
 interface/lib/classes/remoting_lib.inc.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index 5186c3c..510c726 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -783,9 +783,9 @@
                 } 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;

--
Gitblit v1.9.1