From 930894e3ab3834768f3a5720d1249c20881f8d2a Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Thu, 02 Apr 2009 10:12:40 -0400
Subject: [PATCH] - Implemented wildcard CNAME records.

---
 server/plugins-available/shelluser_base_plugin.inc.php |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index 1420a5e..151dfda 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -148,11 +148,14 @@
 			// Get the UID of the user
 			$userid = intval($app->system->getuid($data['old']['username']));
 			if($userid > $this->min_uid) {
-				$command = 'userdel -f -r';
-				$command .= ' '.escapeshellcmd($data['old']['username']);
+				// We delete only non jailkit users, jailkit users will be deleted by the jailkit plugin.
+				if ($data['old']['chroot'] != "jailkit") {
+					$command = 'userdel -f';
+					$command .= ' '.escapeshellcmd($data['old']['username']);
 			
-				exec($command);
-				$app->log("Deleted shelluser: ".$data['old']['username'],LOGLEVEL_DEBUG);
+					exec($command);
+					$app->log("Deleted shelluser: ".$data['old']['username'],LOGLEVEL_DEBUG);
+				}
 			
 			} else {
 				$app->log("UID = $userid for shelluser:".$data['old']['username']." not allowed.",LOGLEVEL_ERROR);

--
Gitblit v1.9.1