Skip to content
Snippets Groups Projects
Commit dbbafff1 authored by tbrehm's avatar tbrehm
Browse files

Patch from Filip that enables settting of sys_user.modules and...

Patch from Filip that enables settting of sys_user.modules and sys_user.startmodule via client_add remote API call
parent 5384ed02
No related branches found
No related tags found
No related merge requests found
......@@ -664,8 +664,20 @@ class remoting_lib {
global $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 = 'dashboard,mail,sites,dns,tools';
} 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment