From e756e7e8a99d604ef85a9630c856bc0ffae2a3f0 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 10 Jan 2012 05:16:15 -0500
Subject: [PATCH] Fixed: FS#1967 - AWStats statistics not accessible when the website uses suphp.
---
interface/web/sites/shell_user_edit.php | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php
index c3102cd..bb93bf2 100644
--- a/interface/web/sites/shell_user_edit.php
+++ b/interface/web/sites/shell_user_edit.php
@@ -81,7 +81,7 @@
if ($this->dataRecord['username'] != ""){
/* REMOVE the restriction */
- $app->tpl->setVar("username", str_replace($shelluser_prefix , '', $this->dataRecord['username']));
+ $app->tpl->setVar("username", preg_replace('/'.$shelluser_prefix.'/', '', $this->dataRecord['username'], 1));
}
if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
$app->tpl->setVar("username_prefix", $global_config['shelluser_prefix']);
@@ -112,6 +112,8 @@
if(isset($this->dataRecord['username']) && trim($this->dataRecord['username']) == '') $app->tform->errorMessage .= $app->tform->lng('username_error_empty').'<br />';
if(isset($this->dataRecord['username']) && empty($this->dataRecord['parent_domain_id'])) $app->tform->errorMessage .= $app->tform->lng('parent_domain_id_error_empty').'<br />';
+ if(isset($this->dataRecord['ssh_rsa'])) $this->dataRecord['ssh_rsa'] = trim($this->dataRecord['ssh_rsa']);
+
parent::onSubmit();
}
--
Gitblit v1.9.1