diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index 19e4e3f12d2bf8cce4b86ba07abd3e9d4a9dc1e0..816600234e74641cbfcf14265289cf38ea4c66a8 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -1942,12 +1942,12 @@ class remoting { $app->uses('remoting_lib'); - //* Load the form definition - $app->remoting_lib->loadFormDef($formdef_file); - //* load the user profile of the client $app->remoting_lib->loadUserProfile($client_id); + //* Load the form definition + $app->remoting_lib->loadFormDef($formdef_file); + //* Get the SQL query $sql = $app->remoting_lib->getSQL($params,'INSERT',0); if($app->remoting_lib->errorMessage != '') { @@ -1989,12 +1989,12 @@ class remoting { $app->uses('remoting_lib'); - //* Load the form definition - $app->remoting_lib->loadFormDef($formdef_file); - //* load the user profile of the client $app->remoting_lib->loadUserProfile($client_id); + //* Load the form definition + $app->remoting_lib->loadFormDef($formdef_file); + //* Get the SQL query $sql = $app->remoting_lib->getSQL($params,'UPDATE',$primary_id); if($app->remoting_lib->errorMessage != '') { @@ -2036,6 +2036,9 @@ class remoting { $app->uses('remoting_lib'); + //* load the user profile of the client + $app->remoting_lib->loadUserProfile($client_id); + //* Load the form definition $app->remoting_lib->loadFormDef($formdef_file); diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index 38d9010cef71823428cc721e6ffc9cafb6d27b9d..565cad10307b048cd72b548e06832caa6a7e1b1a 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -148,6 +148,7 @@ class remoting_lib { $this->sys_userid = 1; $this->sys_default_group = 1; $this->sys_groups = 1; + $_SESSION["s"]["user"]["typ"] = 'admin'; } else { //* load system user - try with sysuser and before with userid (workarrond) /* @@ -165,6 +166,7 @@ class remoting_lib { $this->sys_userid = $user['userid']; $this->sys_default_group = $user['default_group']; $this->sys_groups = $user['groups']; + $_SESSION["s"]["user"]["typ"] = $user['typ']; } return true;