diff --git a/composer.json b/composer.json index d27aa11..b7fa120 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "datatables.net/datatables.net-bs5": "2.0.8", "datatables.net/datatables.net-buttons-bs5": "3.0.2", "fortawesome/font-awesome": "v6.5.2", - "ltb-project/ltb-common": "dev-main", + "ltb-project/ltb-common": "dev-44-openldap-account-disabling", "twbs/bootstrap": "v5.3.2" }, "scripts": { diff --git a/htdocs/disableaccount.php b/htdocs/disableaccount.php index f54b424..ce3e1ba 100644 --- a/htdocs/disableaccount.php +++ b/htdocs/disableaccount.php @@ -6,6 +6,7 @@ $result = ""; $dn = ""; $password = ""; +$comment = ""; if (isset($_POST["dn"]) and $_POST["dn"]) { $dn = $_POST["dn"]; @@ -13,6 +14,11 @@ $result = "dnrequired"; } +if (isset($_POST["comment"]) and $_POST["comment"]) { + $comment = $_POST["comment"]; +} + + if (!$use_disableaccount) { $result = "actionforbidden"; } @@ -38,7 +44,7 @@ } if ($audit_log_file) { - auditlog($audit_log_file, $dn, $audit_admin, "disableaccount", $result); + auditlog($audit_log_file, $dn, $audit_admin, "disableaccount", $result, $comment); } header('Location: index.php?page=display&dn='.$dn.'&disableaccountresult='.$result); diff --git a/htdocs/enableaccount.php b/htdocs/enableaccount.php index 0756186..f2d23a9 100644 --- a/htdocs/enableaccount.php +++ b/htdocs/enableaccount.php @@ -6,6 +6,7 @@ $result = ""; $dn = ""; $password = ""; +$comment = ""; if (isset($_POST["dn"]) and $_POST["dn"]) { $dn = $_POST["dn"]; @@ -13,6 +14,11 @@ $result = "dnrequired"; } +if (isset($_POST["comment"]) and $_POST["comment"]) { + $comment = $_POST["comment"]; +} + + if (!$use_enableaccount) { $result = "actionforbidden"; } @@ -38,7 +44,7 @@ } if ($audit_log_file) { - auditlog($audit_log_file, $dn, $audit_admin, "enableaccount", $result); + auditlog($audit_log_file, $dn, $audit_admin, "enableaccount", $result, $comment); } header('Location: index.php?page=display&dn='.$dn.'&enableaccountresult='.$result);