Skip to content

Commit dbc8e9d

Browse files
author
Till Brehm
committed
Merge branch 'feature/allow-updating-sysuser-modules-through-remoting' into 'stable-3.1'
Allow updating sysuser modules through remoting See merge request ispconfig/ispconfig3!984
2 parents 7c67b8e + b9cd2f6 commit dbc8e9d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

interface/lib/classes/remoting_lib.inc.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ function ispconfig_sysuser_update($params, $client_id){
309309
$username = $params["username"];
310310
$clear_password = $params["password"];
311311
$language = $params['language'];
312+
$modules = $params['modules'];
312313
$client_id = $app->functions->intval($client_id);
313314

314315
if(!isset($params['_ispconfig_pw_crypted']) || $params['_ispconfig_pw_crypted'] != 1) $password = $app->auth->crypt_password(stripslashes($clear_password));
@@ -327,8 +328,14 @@ function ispconfig_sysuser_update($params, $client_id){
327328
$params[] = $language;
328329
}
329330

331+
$modulesstring = '';
332+
if (!empty($modules)) {
333+
$modulesstring = ', modules = ?';
334+
$params[] = $modules;
335+
}
336+
330337
$params[] = $client_id;
331-
$sql = "UPDATE sys_user set username = ? $pwstring $langstring WHERE client_id = ?";
338+
$sql = "UPDATE sys_user set username = ? $pwstring $langstring $modulesstring WHERE client_id = ?";
332339
$app->db->query($sql, true, $params);
333340
}
334341

0 commit comments

Comments
 (0)