fixed deletion of default-ftp-user possible via API (not through the interface though); refs #741

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-10-27 16:02:32 +01:00
parent 88ee76e4c9
commit 822bb2bd4d
2 changed files with 20 additions and 0 deletions

View File

@@ -541,6 +541,9 @@ class Ftps extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEntit
"username" => $customer_data['loginname']
);
Database::pexecute($stmt, $params, true, true);
} else {
// do not allow removing default ftp-account
\Froxlor\UI\Response::standard_error('ftp_cantdeletemainaccount', '', true);
}
// remove all quotatallies