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

Inactivity Auto Sign Out Plugin

外掛說明

This plugin automatically logs a user out after a certain period of time of inactivity.
It creates new meta data for each WP user and checks that the user hasn’t been inactive for too long.
If the user has been inactive for too long, then the user is automatically logged out and redirected to a URL of your choice.
It tracks the users activity in both the main site and admin area.

You can set the maximum inactivity time and redirect URL by changing the defined constants in the plugin’s PHP page – no admin menus are available yet see FAQs.

It’s only a single PHP page, so it’s easy to alter to work however you’d like it to work.

It works with BuddyPress too.

Let me know if you find a better way of doing this, and I’ll update the plugin.

Installation Bug

[FIXED!] Currently, when you activate the plugin, you are automatically logged out!

安裝方式

  1. Upload the plugin’s folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. That’s it! You can test it is working correctly by changing the
    MM_INACTIVITY_AUTO_LOG_OUT_MAX_INACTIVITY_TIME definition to a few seconds and seeing if you
    get automatically logged out or not.

常見問題集

How do I change the inactivity time period?

Change this code in the plugin’s main php file. Set the time period to whatever you like.
It’s in seconds, so 3x60x60 is equal to 3 hours of inactivity.

define('MM_INACTIVITY_AUTO_LOG_OUT_MAX_INACTIVITY_TIME', 3*60*60);
How do I set the redirect URL on auto log out?

You can change this definition to any URL you like. The default is site_url(), which is your home page.
You could set it to:

define('MM_INACTIVITY_AUTO_LOG_OUT_REDIRECT_URL', site_url());

define('MM_INACTIVITY_AUTO_LOG_OUT_REDIRECT_URL', 'http://www.example.com');

define('MM_INACTIVITY_AUTO_LOG_OUT_REDIRECT_URL', site_url() . '/auto-logged-out.html');

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Inactivity Auto Sign Out Plugin〉的開發相關工作。

參與者

變更記錄

0.2

  • Added an activation call to stop you from being logged out when you first activate the plugin!

0.1

  • The first version – design for simple installation!

0.0

  • This version never actually existed!