Commit 6e4ff6e5 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5995-audit-events-dn-are-too-long' into '1.4-dev'

Resolve "Audit events DN are too long"

See merge request fusiondirectory/fd!599
Showing with 4 additions and 4 deletions
+4 -4
......@@ -61,7 +61,7 @@ class logging
/* Create data object */
$entry = [
'timestamp' => time(),
'timestamp' => microtime(TRUE),
'action' => $action,
'objecttype' => $objecttype,
'object' => $object,
......@@ -144,7 +144,7 @@ class logging
}
$tabObject = objects::create('auditEvent');
$baseObject = $tabObject->getBaseObject();
$baseObject->fdAuditDateTime = new DateTime('@'.$entry['timestamp']);
$baseObject->fdAuditDateTime = DateTime::createFromFormat('U.u', number_format($entry['timestamp'], 6, '.', ''));
$baseObject->fdAuditAction = $entry['action'];
$baseObject->fdAuditAuthorDN = $entry['user'];
$baseObject->fdAuditObjectType = $entry['objecttype'];
......
......@@ -1843,8 +1843,8 @@ class simplePlugin implements SimpleTab
/* Build DN with multiple attributes */
$usableAttributes = [];
foreach ($this->attributes as $attr) {
if (($attr != $attribute) && is_string($this->$attr) && ($this->$attr != '')) {
$usableAttributes[] = $attr;
if (($attr != $attribute) && is_scalar($this->$attr) && ($this->$attr != '')) {
$usableAttributes[] = (string)$attr;
}
}
for ($i = 1; $i < count($usableAttributes); $i++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment