From a29914f406b03519ccb406362a8770b1bd359b70 Mon Sep 17 00:00:00 2001 From: tbrehm Date: Sun, 1 Mar 2009 15:55:05 +0000 Subject: [PATCH] Fixed: FS#536 - Adding Email Domain - Reseller sees all clients --- interface/web/mail/mail_domain_edit.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index 56f8eef56..bf22cdaf9 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -76,8 +76,13 @@ class page_action extends tform_actions { global $app, $conf; if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - // Getting Domains of the user - $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0"; + // Getting Clients of the user + if($_SESSION["s"]["user"]["typ"] == 'admin') { + $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0"; + } else { + $client_group_id = $_SESSION["s"]["user"]["default_group"]; + $sql = "SELECT client.client_id, limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"; + } $clients = $app->db->queryAllRecords($sql); $client_select = ''; if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= ""; -- GitLab