chg: [auditLog:entity] unset useless noise from user-settings

cli-modification-summary
Sami Mokaddem 2022-10-21 16:06:09 +02:00
parent fc0920c7c3
commit b555aed178
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 10 additions and 0 deletions

View File

@ -65,4 +65,14 @@ class AuditLog extends AppModel
}
return $title;
}
public function rearrangeForAPI(): void
{
if (!empty($this->user)) {
$this->user = $this->user->toArray();
}
if (!empty($this->user['user_settings_by_name_with_fallback'])) {
unset($this->user['user_settings_by_name_with_fallback']);
}
}
}