From 5d93b3a4ecc8931eb8c2fcf619eb34c30068bccc Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Fri, 09 Jan 2015 11:34:21 -0500
Subject: [PATCH] add missing sql-column mail_user.sender_cc to inc-updates

---
 server/plugins-available/shelluser_base_plugin.inc.php |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index a6dbfcf..e19796c 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -254,11 +254,16 @@
 				// check if we have to delete the dir
 				$check = $app->db->queryOneRecord('SELECT shell_user_id FROM `shell_user` WHERE `dir` = \'' . $app->db->quote($data['old']['dir']) . '\'');
 				if(!$check && is_dir($data['old']['dir'])) {
+					
+					$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($data['old']['parent_domain_id']));
+					
+					$app->system->web_folder_protection($web['document_root'], false);
+					
 					// delete dir
 					$homedir = $data['old']['dir'];
 					if(substr($homedir, -1) !== '/') $homedir .= '/';
 					$files = array('.bash_logout', '.bash_history', '.bashrc', '.profile');
-					$dirs = array('.ssh');
+					$dirs = array('.ssh', '.cache');
 					foreach($files as $delfile) {
 						if(is_file($homedir . $delfile) && fileowner($homedir . $delfile) == $userid) unlink($homedir . $delfile);
 					}
@@ -281,6 +286,8 @@
 					}
 					unset($files);
 					unset($dirs);
+					
+					$app->system->web_folder_protection($web['document_root'], true);
 				}
 				
 				// We delete only non jailkit users, jailkit users will be deleted by the jailkit plugin.

--
Gitblit v1.9.1