Login As User

Switch to any user account instantly for testing, troubleshooting, or support. See exactly what your users see without asking for their password, and switch back to your admin account with one click.

Use Cases

  • Test what subscribers, editors, or custom roles can actually access
  • Troubleshoot “I can’t see this page” issues by experiencing them firsthand
  • Verify that permissions are set up correctly before going live
  • Help users by seeing the exact problem they’re describing
  • Test WooCommerce customer views, member dashboards, or restricted content

How It Works

  1. From the Users list, click “Login As” next to any user
  2. You’re instantly logged in as that user
  3. A red banner and floating button remind you that you’re impersonating
  4. Click “Switch Back” to return to your admin account
  5. All switches are logged for security auditing

Where to Find It

Go to Users → All Users. Hover over any user row and you’ll see a “Login As” link in the row actions (alongside Edit, Delete, etc.).

Switching to a User

  1. Go to Users → All Users
  2. Find the user you want to impersonate
  3. Hover over their row to reveal action links
  4. Click Login As
  5. You’re now logged in as that user

You’ll be redirected to the WordPress dashboard as that user. The admin interface will show exactly what they see based on their role and capabilities.

Visual Reminders

When you’re logged in as another user, you’ll see prominent reminders:

Top Banner

A red banner appears at the top of every page (admin and frontend) showing “You are logged in as another user” with a switch back link.

Floating Button

A red floating button in the bottom-right corner shows:

  • The current user’s name and role
  • A “Switch Back” link

These reminders ensure you don’t forget you’re impersonating someone and accidentally make changes as the wrong user.

Switching Back

You can switch back to your admin account in three ways:

  1. Admin Bar - Click “← Switch Back” in the WordPress admin bar (when visible)
  2. Top Banner - Click the “Switch Back to [Your Name]” link in the red banner
  3. Floating Button - Click the red floating button in the bottom-right corner

All methods return you to your original admin account immediately.

Security Features

Admin-Only Access

Only users with the manage_options capability (typically Administrators) can use the Login As feature. Regular editors, authors, and subscribers cannot impersonate other users.

Session Timeout

Switch-back sessions expire after 1 hour. If you don’t switch back within that time, you’ll remain logged in as the impersonated user but won’t have an easy way back - you’ll need to log out and log back in with your own credentials.

Audit Logging

Every “Login As” action is logged with:

  • Who switched (original user ID)
  • Who they switched to (target user ID)
  • When it happened (timestamp)
  • IP address

Logs are stored in the database and the most recent 100 entries are kept.

Viewing the Audit Log

The login-as audit log is stored in WordPress options. To review it, you can query it directly or use a database tool:

// Get the audit log
$log = get_option('switchboard_login_as_log', []);

// Each entry contains:
// - 'from' => original user ID
// - 'to' => target user ID
// - 'time' => MySQL datetime
// - 'ip' => IP address

Limitations

  • Only administrators (users with manage_options capability) can use this feature
  • You cannot use “Login As” on yourself (the link won’t appear)
  • The switch-back session expires after 1 hour
  • Frontend admin bar must be visible to use the admin bar switch-back link (the floating button works regardless)

FAQ

Can editors or authors use this feature?No. Only users with the manage_options capability can use Login As. This is typically limited to Administrators. You cannot grant this ability to other roles without code customization.
Does switching reset the target user’s session?No. Your switch creates a new browser session for you as that user. If they’re also logged in on another device, their session continues unaffected.
What happens if I switch to an inactive user?You’ll be logged in as them normally. If their account has restrictions (like membership expired), you’ll experience those same restrictions.
Can I switch to a user and then switch to another without going back first?No. You must switch back to your admin account first, then switch to the new user. This maintains the audit trail and ensures proper session handling.
Is this logged for compliance?Yes, every switch is logged with timestamp, IPs, and user IDs. The log keeps the last 100 entries. For stricter compliance needs, you may want additional security logging plugins.

Always switch back to your admin account when you’re done troubleshooting. The visual reminders help, but it’s good practice to verify you’re back to your own account before making administrative changes.

PRO

Get access to all 147 modules with a single license

Upgrade to Pro