Skip to content

Commit e6e4454

Browse files
committed
Fixed problem with client ID in shell and ftp user prefix.
1 parent 310ec5c commit e6e4454

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

interface/web/sites/tools.inc.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ function getClientName($dataRecord) {
6060
// Get the group-id from the data itself
6161
if(isset($dataRecord['client_group_id'])) {
6262
$client_group_id = $dataRecord['client_group_id'];
63+
} elseif (isset($dataRecord['parent_domain_id'])) {
64+
$tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = " . $dataRecord['parent_domain_id']);
65+
$client_group_id = $tmp['sys_groupid'];
6366
} else {
6467
$client_group_id = $dataRecord['sys_groupid'];
6568
}
@@ -82,7 +85,10 @@ function getClientID($dataRecord) {
8285
// Get the group-id from the data itself
8386
if(isset($dataRecord['client_group_id'])) {
8487
$client_group_id = $dataRecord['client_group_id'];
85-
} else {
88+
} elseif (isset($dataRecord['parent_domain_id'])) {
89+
$tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = " . $dataRecord['parent_domain_id']);
90+
$client_group_id = $tmp['sys_groupid'];
91+
} else {
8692
$client_group_id = $dataRecord['sys_groupid'];
8793
}
8894
}

0 commit comments

Comments
 (0)