From d8faa4e7e3fb74e554f6c9339f6fe4e2883c3bf1 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 18 Sep 2015 13:43:03 -0400
Subject: [PATCH] Fix by dirkd: Since file() doesn't remove "\n" from the lines read the condition $lines[$l] == '' never evaluated to true. So $mailHeaders would always contain every line from the template while $mailBody contained none of them.
---
interface/web/tools/user_settings.php | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/interface/web/tools/user_settings.php b/interface/web/tools/user_settings.php
index 95018ac..5754245 100644
--- a/interface/web/tools/user_settings.php
+++ b/interface/web/tools/user_settings.php
@@ -44,6 +44,10 @@
//* Check permissions for module
$app->auth->check_module_permissions('tools');
+if($_SESSION['s']['user']['typ'] == 'admin') {
+ $app->auth->check_security_permissions('admin_allow_new_admin');
+}
+
// Loading classes
$app->uses('tpl,tform,tform_actions');
$app->load('tform_actions');
@@ -93,6 +97,16 @@
$app->error('Invalid language.');
}
}
+
+ function onAfterUpdate() {
+ global $app;
+
+ if($_POST['passwort'] != '') {
+ $tmp_user = $app->db->queryOneRecord("SELECT passwort FROM sys_user WHERE userid = ?", $_SESSION['s']['user']['userid']);
+ $_SESSION['s']['user']['passwort'] = $tmp_user['passwort'];
+ unset($tmp_user);
+ }
+ }
}
--
Gitblit v1.9.1