From 22b413bb98bb60e17d6141a3e6227ef97865e6a5 Mon Sep 17 00:00:00 2001
From: quentusrex <quentusrex@ispconfig3>
Date: Sat, 1 Nov 2008 01:29:02 +0000
Subject: [PATCH] Fix bug where all non admin clients add a site, that it goes
 into client0.

---
 interface/web/sites/web_domain_edit.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 6d5e92b99c..0a39a2597a 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/interface/web/sites/web_domain_edit.php
@@ -225,7 +225,7 @@ class page_action extends tform_actions {
 		// get the ID of the client
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
 			$client_group_id = $_SESSION["s"]["user"]["default_group"];
-			$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+			$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id");
 			$client_id = intval($client["client_id"]);
 		} else {
 			//$client_id = intval($this->dataRecord["client_group_id"]);
@@ -265,7 +265,7 @@ class page_action extends tform_actions {
 		// get the ID of the client
 		if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
 			$client_group_id = $_SESSION["s"]["user"]["default_group"];
-			$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+			$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id");
 			$client_id = intval($client["client_id"]);
 		} else {
 			//$client_id = intval(@$web_rec["client_group_id"]);
-- 
GitLab