[Web] Fix da_acl when adding DA without domain

master
andryyy 2020-08-19 09:05:04 +02:00
parent dbaabb05e2
commit f8af5cae88
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 9 additions and 11 deletions

View File

@ -121,17 +121,15 @@ function domain_admin($_action, $_data = null) {
);
return false;
}
if ($valid_domains != 0) {
$stmt = $pdo->prepare("INSERT INTO `da_acl` (`username`) VALUES (:username)");
$stmt->execute(array(
':username' => $username
));
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('domain_admin_added', htmlspecialchars($username))
);
}
$stmt = $pdo->prepare("INSERT INTO `da_acl` (`username`) VALUES (:username)");
$stmt->execute(array(
':username' => $username
));
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('domain_admin_added', htmlspecialchars($username))
);
break;
case 'edit':
if ($_SESSION['mailcow_cc_role'] != "admin" && $_SESSION['mailcow_cc_role'] != "domainadmin") {