From 16ebfdab2520d4ddda358d961813afb106a6a5e8 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 22 Jul 2016 09:55:44 -0400
Subject: [PATCH] Fixed #4043 3.1 Remote API - client_add: sys_user insert fails if client parameter 'usertheme' is empty

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

diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index e697810..8547ff3 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -284,7 +284,7 @@
 				$startmodule=$_modules[0];
 			}
 		}
-		$usertheme = $params["usertheme"];
+		$usertheme = (isset($params["usertheme"]) && $params["usertheme"] != '')?$params["usertheme"]:'default';
 		$type = 'user';
 		$active = 1;
 		$insert_id = $app->functions->intval($insert_id);

--
Gitblit v1.9.1