From ada1e6979c92651c13e8538881d2d756c7b54e6d Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Sun, 08 Mar 2009 13:36:34 -0400
Subject: [PATCH] better form lengths

---
 interface/web/sites/ftp_user_edit.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/interface/web/sites/ftp_user_edit.php b/interface/web/sites/ftp_user_edit.php
index 2ceff9c..8c31940 100644
--- a/interface/web/sites/ftp_user_edit.php
+++ b/interface/web/sites/ftp_user_edit.php
@@ -155,7 +155,7 @@
 		
 		/* restrict the names */
 		if ($app->tform->errorMessage == '') {
-			$this->dataRecord['username'] = $restriction . $this->dataRecord['username'];
+			$this->dataRecord['username'] = $ftpuser_prefix . $this->dataRecord['username'];
 		}
 	}
 	
@@ -173,13 +173,15 @@
 			$client_group_id = $_SESSION["s"]["user"]["default_group"];
 		} else {
 			// Get the group-id from the data itself
-			$client_group_id = $this->dataRecord['client_group_id'];
+			$web = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = ".intval($this->dataRecord['parent_domain_id']));
+			$client_group_id = $web['sys_groupid'];
 		}
 		/* get the name of the client */
 		$tmp = $app->db->queryOneRecord("SELECT name FROM sys_group WHERE groupid = " . $client_group_id);
 		$clientName = $tmp['name'];
 		if ($clientName == "") $clientName = 'default';
 		$clientName = convertClientName($clientName);
+		return $clientName;
 	
 	}
 	

--
Gitblit v1.9.1