WordPress.org

Taiwan 正體中文

  • 佈景主題目錄
  • 外掛目錄
  • 最新消息
  • 技術支援
  • 關於我們
  • 團隊
  • 取得 WordPress
取得 WordPress
WordPress.org

Plugin Directory

Prevent Concurrent Logins

  • 提交外掛
  • 我的最愛
  • 登入
  • 提交外掛
  • 我的最愛
  • 登入

這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Prevent Concurrent Logins

由 Frankie Jarrett 開發
下載
  • 詳細資料
  • 使用者評論
  • 開發資訊
技術支援

外掛說明

Did you find this plugin helpful? Please consider leaving a 5-star review.

  • Deters members/subscribers from sharing their accounts with others
  • Hardens security by destoying old sessions automatically
  • Prompts old sessions to login again if they want to continue
  • Ideal for membership sites and web applications

Important: If you plan to network-activate this plugin on a multisite network, please install the Proper Network Activation plugin beforehand.

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.

常見問題集

Where are the options for this plugin?

This plugin does not have a settings page. Simply put, I don’t like bloating my plugins with a bunch of options.

Instead, I try to develop functionality using the 80/20 principle so that for 80% of use cases you all you need to do is activate the plugin and it “just works”.

For the other 20% of you who want things to behave differently there are hooks available in the plugin so you can customize default behaviors.

Can I still allow concurrent logins for certain users?

Yes, simply add this code to your theme’s functions.php file or as an MU plugin:

function my_pcl_whitelist_user_ids( $prevent, $user_id ) {

    $whitelist = array( 1, 2, 3 ); // Provide an array of whitelisted user IDs

    return in_array( $user_id, $whitelist ) ? false : $prevent;

}
add_filter( 'pcl_prevent_concurrent_logins', 'my_pcl_whitelist_user_ids', 10, 2 );

Or this code to bypass users with certain roles:

function my_pcl_whitelist_roles( $prevent, $user_id ) {

    $whitelist = array( 'administrator', 'editor' ); // Provide an array of whitelisted user roles

    $user = get_user_by( 'id', absint( $user_id ) );

    $roles = ! empty( $user->roles ) ? $user->roles : array();

    return array_intersect( $roles, $whitelist ) ? false : $prevent;

}
add_filter( 'pcl_prevent_concurrent_logins', 'my_pcl_whitelist_roles', 10, 2 );

使用者評論

Awesome!!

mcostam1985 2021 年 2 月 2 日
Your awesome man! This plugin with your functions.php code works perfectly. Thank you so much for the time spent working on it.

This plugin is great and has not required any update for 4 years

nddao 2020 年 8 月 13 日
THIS PLUGIN IS SIMPLE AND PERFECT THAT THE AUTHOR HAS NOT NEED TO UPDATE ANYTHING SINCE LAST 4 YEARS. I had to create an account just to give this plugin a 5-star rating and let people know that it works perfectly. I was looking for something to prevent users from concurently login and found this plugin. However, the age of this plugin and the number of active installation (1000+ at this time) made me skip it. The information that this plugin was updated 4 years ago further drove me away. I decided to install another plugin, which made me crazy because it kept log me out every couple minutes. Then I removed the mentioned plugin and gave this plugin a try, and it works as much as I expect.

GREAT!

César 2019 年 12 月 12 日
I tried it on my easytomake online course site, and used 3 browsers. Disconnect the others! Thank you CÉSAR

Great!

Eder Tuffic 2018 年 11 月 12 日
It was exactly what I needed for my course. Thank you!

Muito bom

uilianv 2017 年 4 月 5 日 1 則留言
Faz o que promete, resolve o problema, sem nenhum requinte desnecessário

Super!

Vasily 2017 年 3 月 18 日
Love the functionality. Exactly what i need now. Thank you very much!
閱讀全部 17 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Prevent Concurrent Logins〉的開發相關工作。

參與者
  • Frankie Jarrett

將〈Prevent Concurrent Logins〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

變更記錄

0.4.0 – October 16, 2015

  • Official support for WordPress 4.3

Props fjarrett

0.3.0 – May 4, 2015

  • Action hooks now available after sessions are destroyed for logging purposes (#4)

Props fjarrett

0.2.0 – January 28, 2015

  • Destroy old sessions for all users upon activation

Props fjarrett, chuckreynolds

0.1.1 – January 2, 2015

  • Added filter to allow certain users to have concurrent sessions when necessary

Props fjarrett, nutsandbolts

0.1.0 – December 31, 2014

  • Initial release

Props fjarrett

中繼資料

  • 版本 0.4.0
  • 最後更新 9 年前
  • 啟用安裝數 1,000+
  • WordPress 版本需求 4.1 或更新版本
  • 已測試相容的 WordPress 版本 4.6.29
  • 語言
    English (US)
  • 標籤
    loginmembershipsecuritysenseiusers
  • 進階檢視

評分

5 星,滿分為 5 星
  • 17 個 5 星使用者評論 5 星 17
  • 0 個 4 星使用者評論 4 星 0
  • 0 個 3 星使用者評論 3 星 0
  • 0 個 2 星使用者評論 2 星 0
  • 0 個 1 星使用者評論 1 星 0

新增使用者評論

查看全部使用者評論

參與者

  • Frankie Jarrett

技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

檢視技術支援論壇

  • 關於我們
  • 最新消息
  • 主機代管
  • 隱私權
  • 展示網站
  • 佈景主題目錄
  • 外掛目錄
  • 區塊版面配置目錄
  • Learn
  • 技術支援
  • 開發者資源
  • WordPress.tv ↗
  • 共同參與
  • 活動
  • 贊助基金會 ↗
  • Five for the Future
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

Taiwan 正體中文

  • 造訪我們的 Facebook 粉絲專頁
  • 查看我們的 X (之前的 Twitter) 帳號
  • Visit our Mastodon account
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our YouTube channel
程式碼,如詩