Skip to content

Commit 45858cb

Browse files
committed
Fixed: FS#1073 - (SOAP) Problem with custom_mailfilter->mail_user_update/mail_user_add
1 parent 993bb54 commit 45858cb

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,12 +1942,12 @@ private function insertQuery($formdef_file, $client_id, $params)
19421942

19431943
$app->uses('remoting_lib');
19441944

1945-
//* Load the form definition
1946-
$app->remoting_lib->loadFormDef($formdef_file);
1947-
19481945
//* load the user profile of the client
19491946
$app->remoting_lib->loadUserProfile($client_id);
19501947

1948+
//* Load the form definition
1949+
$app->remoting_lib->loadFormDef($formdef_file);
1950+
19511951
//* Get the SQL query
19521952
$sql = $app->remoting_lib->getSQL($params,'INSERT',0);
19531953
if($app->remoting_lib->errorMessage != '') {
@@ -1989,12 +1989,12 @@ private function updateQuery($formdef_file, $client_id, $primary_id, $params)
19891989

19901990
$app->uses('remoting_lib');
19911991

1992-
//* Load the form definition
1993-
$app->remoting_lib->loadFormDef($formdef_file);
1994-
19951992
//* load the user profile of the client
19961993
$app->remoting_lib->loadUserProfile($client_id);
19971994

1995+
//* Load the form definition
1996+
$app->remoting_lib->loadFormDef($formdef_file);
1997+
19981998
//* Get the SQL query
19991999
$sql = $app->remoting_lib->getSQL($params,'UPDATE',$primary_id);
20002000
if($app->remoting_lib->errorMessage != '') {
@@ -2036,6 +2036,9 @@ private function deleteQuery($formdef_file, $primary_id)
20362036

20372037
$app->uses('remoting_lib');
20382038

2039+
//* load the user profile of the client
2040+
$app->remoting_lib->loadUserProfile($client_id);
2041+
20392042
//* Load the form definition
20402043
$app->remoting_lib->loadFormDef($formdef_file);
20412044

interface/lib/classes/remoting_lib.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ function loadUserProfile($client_id = 0) {
148148
$this->sys_userid = 1;
149149
$this->sys_default_group = 1;
150150
$this->sys_groups = 1;
151+
$_SESSION["s"]["user"]["typ"] = 'admin';
151152
} else {
152153
//* load system user - try with sysuser and before with userid (workarrond)
153154
/*
@@ -165,6 +166,7 @@ function loadUserProfile($client_id = 0) {
165166
$this->sys_userid = $user['userid'];
166167
$this->sys_default_group = $user['default_group'];
167168
$this->sys_groups = $user['groups'];
169+
$_SESSION["s"]["user"]["typ"] = $user['typ'];
168170
}
169171

170172
return true;

0 commit comments

Comments
 (0)