check for name, email and comment, remove duplicate quota code

This commit is contained in:
Uwe Steinmann 2021-05-27 21:52:01 +02:00
parent 9575090fdd
commit 386a18be09

View File

@ -51,13 +51,18 @@ if ($action == "adduser") {
$pwdexpiration = '';
else
$pwdexpiration = $_POST["pwdexpiration"];
if(!isset($_POST["quota"]))
$quota = 0;
else
$quota = (int) $_POST["quota"];
$name = $_POST["name"];
if(!$name) {
UI::exitError(getMLText("admin_tools"),getMLText("user_name_missing"));
}
$email = $_POST["email"];
if(!$email) {
UI::exitError(getMLText("admin_tools"),getMLText("user_email_missing"));
}
$comment = $_POST["comment"];
if ($settings->_strictFormCheck && !$comment) {
UI::exitError(getMLText("admin_tools"),getMLText("user_comment_missing"));
}
$role = preg_replace('/[^0-2]+/', '', $_POST["role"]);
$isHidden = (isset($_POST["ishidden"]) && $_POST["ishidden"]==1 ? 1 : 0);
$isDisabled = (isset($_POST["isdisabled"]) && $_POST["isdisabled"]==1 ? 1 : 0);