Documentation
SwitchUser Pro
Audit Log

Audit Log

Go to SwitchUser → Audit. Events are recorded automatically in the {prefix}switchuser_log database table.

What's Recorded

EventWhen
switch_toSomeone switches into an account
switch_backSomeone switches back (including automatic switch-back after the idle timeout)
page_visitEvery page (front end or admin) opened while switched
wc_add_to_cartA product is added to the cart while switched
wc_order_placedAn 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

SettingDefaultDescription
Auto Purge Retention (Days)30Entries 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.