Skip to content
Snippets Groups Projects
Commit 16b96209 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'xxxx-dupe-query' into 'develop'

Remove duplicate query

See merge request ispconfig/ispconfig3!1714
parents dce41994 1db06ade
No related branches found
No related tags found
No related merge requests found
...@@ -336,13 +336,12 @@ class shelluser_base_plugin { ...@@ -336,13 +336,12 @@ class shelluser_base_plugin {
// Get the UID of the user // Get the UID of the user
$userid = intval($app->system->getuid($data['old']['username'])); $userid = intval($app->system->getuid($data['old']['username']));
if($userid > $this->min_uid) { if($userid > $this->min_uid) {
$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($data['old']['parent_domain_id'])); $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['old']['parent_domain_id']);
// check if we have to delete the dir // check if we have to delete the dir
$check = $app->db->queryOneRecord('SELECT shell_user_id FROM `shell_user` WHERE `dir` = ?', $data['old']['dir']); $check = $app->db->queryOneRecord('SELECT shell_user_id FROM `shell_user` WHERE `dir` = ?', $data['old']['dir']);
if(!$check && is_dir($data['old']['dir'])) { if(!$check && is_dir($data['old']['dir'])) {
$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['old']['parent_domain_id']);
$app->system->web_folder_protection($web['document_root'], false); $app->system->web_folder_protection($web['document_root'], false);
// delete dir // delete dir
......
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