Audit Log
Go to SwitchUser → Audit. Events are recorded automatically in the {prefix}switchuser_log database table.
What's Recorded
| Event | When |
|---|---|
switch_to | Someone switches into an account |
switch_back | Someone switches back (including automatic switch-back after the idle timeout) |
page_visit | Every page (front end or admin) opened while switched |
wc_add_to_cart | A product is added to the cart while switched |
wc_order_placed | An order is placed while switched |
Each entry stores the actor (who started the switch), the origin account, the target account, the URL, IP address, user agent, time (UTC) and a session key that groups all events from one switch session.
Filtering and Export
Filter the log by actor, target (name, username, email or ID) and event type. Export the filtered results as CSV or JSON - useful for compliance reporting.
Retention
| Setting | Default | Description |
|---|---|---|
| Auto Purge Retention (Days) | 30 | Entries older than this are deleted by the daily switchuser_daily_cleanup task. Range 1–3650 |
Anyone with direct database access can change the table. For a tamper-proof trail, also send the switchuser_switched and switchuser_switched_back actions to an external log service.