| 开发者 | windcodex |
|---|---|
| 更新时间 | 2026年5月28日 12:41 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
.zip file.Yes – when done correctly. SwitchGuard protects every switch action with WordPress nonces (CSRF protection), enforces role hierarchy (you can only switch into lower-privilege accounts), and stores the session in a signed, HTTPOnly cookie that cannot be tampered with or replayed.
Never. SwitchGuard switches your WordPress session – no passwords are read, stored, logged, or transmitted at any point.
By default, any user with the edit_users capability (typically Administrators). You can restrict this further to specific roles – for example, allowing only Shop Managers to switch – from the Access Control settings.
No. SwitchGuard automatically blocks switching into any account with equal or higher privilege than the current user. The "Block switching into administrators" setting adds an extra explicit layer on top of this.
Yes. When WooCommerce is active, a Switch To Customer button appears on order edit screens, letting you jump straight into the customer's account to reproduce checkout issues or verify order history.
The admin bar always shows a Switch Back button during an active switch session. Click it to instantly return to your original account. You can also click Switch Off to end the session entirely.
Yes. The switch session is stored in a cookie with a configurable TTL (default 48 hours, adjustable from 1 to 168 hours). When the cookie expires, the session ends automatically.
Yes. SwitchGuard is fully compatible with WordPress multisite networks.
The switch session is stored in a persistent cookie (not a session cookie), so it survives browser restarts until the TTL you configured expires. Once expired, the session ends and you will need to log in again.
SwitchGuard bypasses the login form entirely, so it works naturally alongside most 2FA and membership plugins. If a plugin enforces its own session validation on every page load, there may be edge cases – check the compatibility notes or contact support.
SwitchGuard adds: explicit opt-in requirement (off by default), role hierarchy enforcement (not just capability checks), HMAC-signed session cookies (not plain database rows), and nonce protection on every action. It also integrates directly with WooCommerce order screens and includes an admin-bar quick-search switcher.