Merge pull request #253 from github-ivan/master-fixes

Checking for possible duplicate froxlor-local user entries in ftp-group
This commit is contained in:
Michael Kaufmann
2015-10-30 15:58:08 +01:00

View File

@@ -855,7 +855,11 @@ if ($page == 'customers'
} else { } else {
$local_user = Settings::Get('phpfpm.vhost_httpuser'); $local_user = Settings::Get('phpfpm.vhost_httpuser');
} }
$ins_data['members'] .= ','.$local_user; // check froxlor-local user membership in ftp-group
// without this check addition may duplicate user in list if httpuser == local_user
if (strpos($ins_data['members'], $local_user) !== false) {
$ins_data['members'] .= ','.$local_user;
}
} }
Database::pexecute($ins_stmt, $ins_data); Database::pexecute($ins_stmt, $ins_data);