| | |
| | | $app->tpl->setVar("username", $app->tools_sites->removePrefix($this->dataRecord['username'], $this->dataRecord['username_prefix'], $shelluser_prefix)); |
| | | } |
| | | |
| | | $app->tpl->setVar("username_prefix", $app->tools_sites->getPrefix($this->dataRecord['username_prefix'], $shelluser_prefix, $global_config['shelluser_prefix'])); |
| | | if($this->dataRecord['username'] == "") { |
| | | $app->tpl->setVar("username_prefix", $shelluser_prefix); |
| | | } else { |
| | | $app->tpl->setVar("username_prefix", $app->tools_sites->getPrefix($this->dataRecord['username_prefix'], $shelluser_prefix, $global_config['shelluser_prefix'])); |
| | | } |
| | | |
| | | if($this->id > 0) { |
| | | //* we are editing a existing record |
| | |
| | | } |
| | | } |
| | | unset($blacklist); |
| | | |
| | | if($app->functions->is_allowed_user(trim(strtolower($this->dataRecord['username']))) == false) $app->tform->errorMessage .= $app->tform->lng('username_not_allowed_txt'); |
| | | |
| | | /* |
| | | * If the names should be restricted -> do it! |
| | |
| | | $dir = $app->db->quote($web["document_root"]); |
| | | $uid = $app->db->quote($web["system_user"]); |
| | | $gid = $app->db->quote($web["system_group"]); |
| | | |
| | | // Check system user and group |
| | | if($app->functions->is_allowed_user($uid) == false || $app->functions->is_allowed_group($gid) == false) { |
| | | $app->error($app->tform->lng('invalid_system_user_or_group_txt')); |
| | | } |
| | | |
| | | // The FTP user shall be owned by the same group then the website |
| | | $sys_groupid = $app->functions->intval($web['sys_groupid']); |
| | | |
| | | $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; |
| | | $app->db->query($sql); |
| | | die($sql); |
| | | |
| | | } |
| | | |