From b509d0056fda3793f81d3332c8f601559ae268aa Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 18 Jun 2014 03:20:20 -0400
Subject: [PATCH] Changed a function in tform.inc.php to make it compatible with php 5.1 (used in Centos 5.10).

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

diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php
index 6df3d06..0ceced9 100755
--- a/server/plugins-available/shelluser_base_plugin.inc.php
+++ b/server/plugins-available/shelluser_base_plugin.inc.php
@@ -246,7 +246,15 @@
 		unset($client_data);
 
 		// ssh-rsa authentication variables
-		$sshrsa = $this->data['new']['ssh_rsa'];
+		//$sshrsa = $this->data['new']['ssh_rsa'];
+		$sshrsa = '';
+		$ssh_users = $app->db->queryAllRecords("SELECT ssh_rsa FROM shell_user WHERE parent_domain_id = ".intval($this->data['new']['parent_domain_id']));
+		if(is_array($ssh_users)) {
+			foreach($ssh_users as $sshu) {
+				if($sshu['ssh_rsa'] != '') $sshrsa .= "\n".$sshu['ssh_rsa'];
+			}
+		}
+		$sshrsa = trim($sshrsa);
 		$usrdir = escapeshellcmd($this->data['new']['dir']);
 		$sshdir = $usrdir.'/.ssh';
 		$sshkeys= $usrdir.'/.ssh/authorized_keys';

--
Gitblit v1.9.1