From 752ab3dc79da6fa2dbfd7bfba3c48a6b60c82fa5 Mon Sep 17 00:00:00 2001 From: Florian Schaal <florian@schaal-24.de> Date: Mon, 22 Sep 2014 09:14:03 -0400 Subject: [PATCH] check always $_POST --- interface/web/sites/shell_user_edit.php | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php index 9a8f266..f0c8c36 100644 --- a/interface/web/sites/shell_user_edit.php +++ b/interface/web/sites/shell_user_edit.php @@ -82,7 +82,11 @@ $app->tpl->setVar("username", $app->tools_sites->removePrefix($this->dataRecord['username'], $this->dataRecord['username_prefix'], $shelluser_prefix)); } - $app->tpl->setVar("username_prefix", $app->tools_sites->getPrefix($this->dataRecord['username_prefix'], $shelluser_prefix, $global_config['shelluser_prefix'])); + if($this->dataRecord['username'] == "") { + $app->tpl->setVar("username_prefix", $shelluser_prefix); + } else { + $app->tpl->setVar("username_prefix", $app->tools_sites->getPrefix($this->dataRecord['username_prefix'], $shelluser_prefix, $global_config['shelluser_prefix'])); + } if($this->id > 0) { //* we are editing a existing record @@ -158,6 +162,7 @@ global $app, $conf; $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"])); + $server_id = $app->functions->intval($web["server_id"]); $dir = $app->db->quote($web["document_root"]); $uid = $app->db->quote($web["system_user"]); @@ -166,7 +171,7 @@ // The FTP user shall be owned by the same group then the website $sys_groupid = $app->functions->intval($web['sys_groupid']); - $sql = "UPDATE shell_user SET server_id = $server_id, dir = '$dir', puser = '$puser', pgroup = '$pgroup', sys_groupid = '$sys_groupid' WHERE shell_user_id = ".$this->id; + $sql = "UPDATE shell_user SET server_id = $server_id, dir = '$dir', puser = '$uid', pgroup = '$gid', sys_groupid = '$sys_groupid' WHERE shell_user_id = ".$this->id; $app->db->query($sql); } -- Gitblit v1.9.1