From b4c75070d8f792eebddcf561dcac9c3c94bd6bea Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 26 Jun 2007 07:57:01 -0400
Subject: [PATCH] Several updaes and bugfixes.

---
 interface/web/sites/ftp_user_edit.php |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/interface/web/sites/ftp_user_edit.php b/interface/web/sites/ftp_user_edit.php
index ba709b8..4c90855 100644
--- a/interface/web/sites/ftp_user_edit.php
+++ b/interface/web/sites/ftp_user_edit.php
@@ -54,6 +54,26 @@
 class page_action extends tform_actions {
 	
 	
+	function onAfterInsert() {
+		global $app, $conf;
+		
+		$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
+		$server_id = $web["server_id"];
+		$dir = $web["document_root"];
+		$uid = $web["system_user"];
+		$gid = $web["system_group"];
+		
+		$sql = "UPDATE ftp_user SET server_id = $server_id, dir = '$dir', uid = '$uid', gid = '$gid' WHERE ftp_user_id = ".$this->id;
+		$app->db->query($sql);
+		
+	}
+	
+	function onAfterUpdate() {
+		global $app, $conf;
+		
+		
+	}
+	
 }
 
 $page = new page_action;

--
Gitblit v1.9.1