[WordPress] 外掛分享: One Time Login

首頁外掛目錄 › One Time Login
40,000+
安裝啟用
★★★★★
5/5 分(2 則評價)
66 天前
最後更新
問題解決
WordPress 4.4+ PHP 7.1+ v0.4.0 上架:2016-04-27

內容簡介

需要進入 WordPress 安裝,但不想建立新的使用者帳戶嗎?使用這個外掛和 WP-CLI 為任何現有使用者生成一次性登入 URL:

wp plugin install one-time-login --activate && wp user one-time-login <user>

執行上面的命令後,您會看到像這樣的成功訊息:

http://wpdev.test/wp-login.php?user_id=2&one_time_login_token=ebe62e3

複製 URL,貼到您的網頁瀏覽器中,即可完成!

因為這是一個一次性的登入 URL,它只會生效一次。如果需要再次進入,您需要再次執行 WP-CLI 命令。

歡迎在 Github 提交問題和拉取請求。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.4.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「One Time Login」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Need access to a WordPress install but don’t want to create a new user account? Use this plugin to generate one-time login URLs for any existing user.
Then, copy the URL, paste it into your web browser, and… voila!
Because they are one-time login URLs, they will only work once. If you need access again, you’ll need to run the WP-CLI command again.
Using WP CLI to generate OTT URLs
Example
wp plugin install one-time-login --activate && wp user one-time-login --count=3 --delay-delete

After you run the command above, you’ll see a success message like this:
http://wpdev.test/wp-login.php?user_id=2&one_time_login_token=93974b48e3a418b895fc7ca476f1a607d8b99345

Or like this if you asked for more than one:
http://wpdev.test/wp-login.php?user_id=1&one_time_login_token=2b9c6f5d71d51d530e397ee9da3b50e4e3dd06e7
http://wpdev.test/wp-login.php?user_id=1&one_time_login_token=90897da439a116c613fc1c49c372e6b1f7c72ad8
http://wpdev.test/wp-login.php?user_id=1&one_time_login_token=68c8074743de849db606500c3caa39a7432dc601

Parameters

* count: Generate more than one login token (default: 1);
* delay-delete: Delete existing tokens after 15 minutes, instead of immediately.
Using WP API to generate OTT URLs
Example with cUrl
curl -X POST \
http://wpdev.test/wp-json/one-time-login/v1/token
-H 'authorization: Basic YWRtaW46eFRQeUJ5c3hEckhkY3BNYjE2endiQ2tj'
-H 'cache-control: no-cache'
-H 'postman-token: 8dcfa79a-401a-2c7d-c593-703e683ce785'
-d '{
"user":"admin",
"count": 3,
"delay-delete": true
}'

Parameters

Just as with WP CLI, you can add the count and delay_delete parameters to your call.
Feel free to file issues and pull requests against the project on Github.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon