Checking froxlor-local user membership in ftp-group

It prevents possible duplication in list.
This commit is contained in:
Krisztian Ivancso
2015-10-25 11:48:21 +01:00
parent c7d8cb6d33
commit 4e38f614f2

View File

@@ -855,7 +855,11 @@ if ($page == 'customers'
} else {
$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);