mitydigital / statamic-logger

Detailed, customisable and human-friendly audit logging for Statamic
MIT License
2 stars 1 forks source link

Use the Statamic authenticated user #4

Closed jasperjorna closed 1 month ago

jasperjorna commented 1 month ago

Hi there,

Following up on https://github.com/mitydigital/statamic-logger/issues/3, where the auth()->user is not available on all events dispatched via queues other than sync.

Statamic has $event->authorizedUser available, as mentioned here: https://github.com/statamic/cms/pull/9225

This PR should make it available in the log entries.

martyf commented 1 month ago

Closed due to inability to add to the PR (test suite was failing). Migrated to https://github.com/mitydigital/statamic-logger/pull/5, and merged from there.