From cc1d576124a8350abfae7787b82f1b565f720e87 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 19 Feb 2013 10:30:13 -0500
Subject: [PATCH] - Fixed FS#2655 - usermod fails with "user xyz is currently logged in".

---
 server/plugins-available/apache2_plugin.inc.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 1b424d3..ec8ac46 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -465,7 +465,7 @@
                 $command = 'killall -u '.escapeshellcmd($data['new']['system_user']).' && usermod';
                 $command .= ' --home '.escapeshellcmd($data['new']['document_root']);
                 $command .= ' --gid '.escapeshellcmd($data['new']['system_group']);
-                $command .= ' '.escapeshellcmd($data['new']['system_user']);
+                $command .= ' '.escapeshellcmd($data['new']['system_user']).' 2>/dev/null';
                 exec($command);
             }
             
@@ -701,7 +701,7 @@
 				if($web_config['add_web_users_to_sshusers_group'] == 'y') {
 					$command = 'usermod';
 					$command .= ' --groups sshusers';
-					$command .= ' '.escapeshellcmd($data['new']['system_user']);
+					$command .= ' '.escapeshellcmd($data['new']['system_user']).' 2>/dev/null';
 					$this->_exec($command);
 				}
 

--
Gitblit v1.9.1