From 5bbfc1b098302671bcbf2f754efc627d50eaa5c7 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 13 Jan 2011 09:25:59 -0500
Subject: [PATCH] Added global functions library which conatins a mail functin that supports attachments and a array_merge function that merges arrays that conatain numeric keys and strings correctly.
---
interface/lib/classes/remoting_lib.inc.php | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index 1fb0a11..3f46ef4 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -661,11 +661,23 @@
}
function ispconfig_sysuser_add($params,$insert_id){
- global $app,$sql1;
+ global $conf,$app,$sql1;
$username = $app->db->quote($params["username"]);
$password = $app->db->quote($params["password"]);
- $modules = 'mail,sites,dns,tools';
- $startmodule = 'mail';
+ if(!isset($params['modules'])) {
+ $modules = $conf['interface_modules_enabled'];
+ } else {
+ $modules = $app->db->quote($params['modules']);
+ }
+ if(!isset($params['startmodule'])) {
+ $startmodule = 'dashboard';
+ } else {
+ $startmodule = $app->db->quote($params["startmodule"]);
+ if(!preg_match('/'.$startmodule.'/',$modules)) {
+ $_modules = explode(',',$modules);
+ $startmodule=$_modules[0];
+ }
+ }
$usertheme = $app->db->quote($params["usertheme"]);
$type = 'user';
$active = 1;
--
Gitblit v1.9.1