User Guide — Luxa Users — User Switching

Last updated on September 5, 2026 · 3 min read

Overview

Luxa Users — User Switching lets any administrator instantly log in as another user — without knowing their password. This is useful for:

  • Debugging issues that only affect a specific user account.
  • Previewing the frontend exactly as a customer or member sees it.
  • Testing role-based content restrictions and access rules.
  • Providing hands-on support without asking users to share credentials.

All switch activity is recorded in a log with timestamps and IP addresses.


Switching Into a User Account

  1. In your WordPress admin, go to Luxa Users → User Switching.
  2. Browse or search for the user you want to switch into.
  3. Click the Switch button on their card.
  4. Confirm the prompt — you will be redirected to the site homepage, now logged in as that user.

Only administrators can initiate a switch. Nested switching (switching again while already switched) is intentionally blocked.

Searching and Filtering

  • Use the search bar at the top to filter by display name, username, or email address. Press Ctrl+K (or Cmd+K on Mac) to focus the search field quickly.
  • Use the role filter tabs (All / Admin / Editor / Author / Subscriber) to narrow the list by user role.

Switching Back to Your Admin Account

There are three ways to switch back:

1. Golden Banner (Frontend)

While switched, a persistent golden banner appears at the bottom of every page on the frontend. It shows:

  • The account you are currently using.
  • Your original admin account name.
  • A Switch back button.

Click the button to return to your admin account immediately.

2. Admin Bar

If the WordPress admin bar is visible, look for the ⇄ [username] indicator in the top bar. Click it to reveal a dropdown with a Switch back link.

3. Admin Page

Go to Luxa Users → User Switching in the admin sidebar. A warning banner at the top of the page shows your current switched status and a Switch back to original admin link.


The Switch Log

Every switch event is recorded automatically. To view the log:

  1. Go to Luxa Users → User Switching.
  2. Click the Switch Log button in the top-right corner.

Each log entry shows:

FieldDescription
TimeDate and time the switch occurred.
FromThe account that initiated the switch.
ActionSwitch To or Switch Back.
ToThe account that was switched into.
IPThe IP address of the request.

The log stores up to 200 entries. Older entries are automatically removed when the limit is reached. To delete all entries manually, click Clear Log on the log page.


Security Notes

  • Switch URLs are protected by WordPress nonces — they expire and cannot be reused.
  • Only users with the administrator capability can initiate a switch.
  • Switching is blocked while a session is already active — you must switch back before switching to a different user.
  • All switch activity is logged with timestamps and IP addresses for auditing purposes.
  • The add-on fires the standard wp_login action on every switch, ensuring compatibility with plugins that hook into the login event (session managers, activity logs, etc.).

For Sites Where Users Cannot Access wp-admin

If you have restricted frontend users from accessing the WordPress admin panel, the switch-back flow still works correctly — the golden banner and admin bar button both use a frontend URL (home_url) for the switch-back request, not an admin URL. Users are never redirected to wp-admin during or after a switch.

Powered by LuxaDocs

Leave a Comment