Skip to content

Commit ae07073

Browse files
author
Till Brehm
committed
Fixed issue with shell user creation due to missing parent user and group values in shell_user database records.
1 parent b4284d3 commit ae07073

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

interface/web/sites/shell_user_edit.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ function onAfterInsert() {
158158
global $app, $conf;
159159

160160
$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"]));
161+
161162
$server_id = $app->functions->intval($web["server_id"]);
162163
$dir = $app->db->quote($web["document_root"]);
163164
$uid = $app->db->quote($web["system_user"]);
@@ -166,8 +167,9 @@ function onAfterInsert() {
166167
// The FTP user shall be owned by the same group then the website
167168
$sys_groupid = $app->functions->intval($web['sys_groupid']);
168169

169-
$sql = "UPDATE shell_user SET server_id = $server_id, dir = '$dir', puser = '$puser', pgroup = '$pgroup', sys_groupid = '$sys_groupid' WHERE shell_user_id = ".$this->id;
170+
$sql = "UPDATE shell_user SET server_id = $server_id, dir = '$dir', puser = '$uid', pgroup = '$gid', sys_groupid = '$sys_groupid' WHERE shell_user_id = ".$this->id;
170171
$app->db->query($sql);
172+
die($sql);
171173

172174
}
173175

0 commit comments

Comments
 (0)