Skip to content

Commit 22b413b

Browse files
author
quentusrex
committed
Fix bug where all non admin clients add a site, that it goes into client0.
1 parent b5edc53 commit 22b413b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/web/sites/web_domain_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function onAfterInsert() {
225225
// get the ID of the client
226226
if($_SESSION["s"]["user"]["typ"] != 'admin') {
227227
$client_group_id = $_SESSION["s"]["user"]["default_group"];
228-
$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");
228+
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id");
229229
$client_id = intval($client["client_id"]);
230230
} else {
231231
//$client_id = intval($this->dataRecord["client_group_id"]);
@@ -265,7 +265,7 @@ function onAfterUpdate() {
265265
// get the ID of the client
266266
if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
267267
$client_group_id = $_SESSION["s"]["user"]["default_group"];
268-
$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");
268+
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id");
269269
$client_id = intval($client["client_id"]);
270270
} else {
271271
//$client_id = intval(@$web_rec["client_group_id"]);

0 commit comments

Comments
 (0)