跳到内容

Watrix Login as User

v1.0.5

wataru takahashi · 2026年7月2日 上架

Securely impersonate any user account as an administrator and switch back to your original account with one click.

正在使用
10 以下
评分
暂无
累计下载
413
最近更新
2026年11月18日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

截图

The red impersonation warning bar.
The red impersonation warning bar.
The "Switch to" row action on the Users screen.
The "Switch to" row action on the Users screen.

Watrix Login as User lets administrators sign in as any other user (impersonation) and return to their own account with a single click. It is useful for support requests, reproducing user-reported issues, debugging role and capability problems, and verifying the experience of subscribers, customers or editors without sharing passwords.

Key features:

  • Adds a “Switch to” row action on the Users screen (localised as “切り替え” in Japanese).
  • Adds a “Switch to %s” button on the user profile edit screen.
  • Displays a persistent red warning bar in both the admin and the front-end while an impersonation session is active.
  • The warning bar contains a one-click link back to the original administrator account.
  • Switching and switching-back are protected by nonces and a signed cookie (HMAC-SHA256, AUTH_KEY-derived) so the original user id cannot be forged.
  • A bounded audit log (latest 200 entries) is stored in a single options row. Refused attempts are rate-limited per IP so they cannot push genuine records out.

Security model:

  • Only users who are administrators AND hold the manage_options capability can switch (manage_network_users on multisite).
  • The original (acting) user id is stored in a signed, Secure / HttpOnly / SameSite=Lax cookie.
  • Nonce verification, self-switch prevention, nested-switch prevention and clean-up on user deletion are implemented.
  • Requests are only handled for logged-in users on the Users and Dashboard screens; anonymous admin-ajax.php / admin-post.php requests are ignored.
  • Session tokens of the administrator (on switch) and of the impersonation session (on switch-back) are destroyed server-side.
  • If the AUTH_KEY salts required for signing are missing, the plugin fails closed and the feature is disabled.

日本語

概要

Watrix Login as User は、管理者が他のユーザーになりすまして WordPress を操作する「代理ログイン」機能を提供します。サポート対応・動作確認・権限デバッグなどに有用です。

主な機能

  • ユーザー一覧の各行に「切り替え」リンクを追加(英語ロケールでは “Switch to”)
  • ユーザー編集画面にも「%s に切り替え」ボタンを追加
  • 代理ログイン中は管理画面・フロント画面の上部に赤い警告バーを常時表示
  • バー内のリンクで元の管理者アカウントへ即時復帰
  • 切替・復帰は nonce + 署名付き Cookie (HMAC-SHA256) で保護
  • 監査ログをオプションテーブルに最小限保存(最新 200 件。拒否の記録は IP ごとに 10 分で 10 件まで)

セキュリティ

  • 切替を許可するのは administrator かつ manage_options 保有者のみ(マルチサイト時は manage_network_users)
  • 元ユーザー ID は AUTH_KEY で署名された Secure / HttpOnly / SameSite=Lax Cookie に保存
  • nonce 検証・自身への切替防止・代理ログイン中の再切替防止・ユーザー削除時のクリーンアップを実装
  • 切替・復帰はログイン中のユーザーがユーザー一覧とダッシュボードから送ったリクエストだけを処理し、未ログインの admin-ajax.php・admin-post.php へのリクエストは無視
  • 切替時は管理者のセッション、復帰時は代理ログインのセッションをサーバー側でも破棄
  • AUTH_KEY 系 SALT が未設定なら fail-closed で機能を無効化

インストール

  1. プラグインを wp-content/plugins/watrix-login-as-user/ にアップロード
  2. WordPress 管理画面の「プラグイン」から有効化
  3. 「ユーザー一覧」または個別のユーザー編集画面で「切り替え」を実行
  4. 代理ログイン中は画面上部の赤いバーから元のアカウントに戻れます

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums