wordpress注销_如何自动注销WordPress中的空闲用户

wordpress注销

Do you want to automatically log out idle users in WordPress? As a security-conscious site admin, you may want to force inactive users to login again.

您是否要自动注销WordPress中的闲置用户? 作为安全意识强的网站管理员,您可能要强制不活动的用户再次登录。

Banking websites and apps already use this technique to avoid unauthorized users from accessing accounts or hijacking them. You can also implement this functionality on your own WordPress website to improve security.

银行网站和应用程序已经使用这种技术来避免未经授权的用户访问帐户或劫持它们。 您也可以在自己的WordPress网站上实现此功能,以提高安全性。

In this article, we will show you how to automatically log out inactive users in WordPress. Once logged out, users will be asked to log in again to resume what they were doing.

在本文中,我们将向您展示如何自动注销WordPress中的非活动用户。 注销后,将要求用户再次登录以恢复他们正在做的事情。

How to automatically logout inactive or idle users in WordPress

The first thing you need to do is install and activate the Inactive Logout plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活非活动注销插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, simply go to Settings » Inactive Logout page to configure the plugin settings.

激活后,只需转到设置»非活动注销页面即可配置插件设置。

Settings page for Inactive Logout plugin

First, you need to enter the time after which a user will be automatically logged out. You can enter the time in minutes and make sure it is not too short or too long.

首先,您需要输入时间,之后用户将被自动注销。 您可以以分钟为单位输入时间,并确保时间不要太短或太长。

After that, you can enter a message that you want to be displayed to inactive users.

之后,您可以输入要显示给不活动用户的消息。

Below the message field, you will find more plugin options to change logout functionality. The default settings would work for most websites, but you can change them if you want.

在消息字段下方,您将找到更多插件选项来更改注销功能。 默认设置适用于大多数网站,但是您可以根据需要更改它们。

Inactive users timeout settings

Popup Background – You can enable this option if you want to change the background color of screen when a user session times out. This option will cover the user’s browser screen and will keep the contents hidden from prying eyes.

弹出背景 –如果要在用户会话超时时更改屏幕的背景色,则可以启用此选项。 此选项将覆盖用户的浏览器屏幕,并使内容不会被撬开。

Disable Timeout Countdown – This option will remove the countdown warning and will directly logout idle users.

禁用超时倒计时 –此选项将删除倒计时警告,并将直接注销空闲用户。

Show Warn Message Only – If you don’t want to use auto logout feature, then check this option. It will only display the warning message and will cover the screen if you have popup background option checked.

仅显示警告消息 –如果您不想使用自动注销功能,请选中此选项。 如果选中了弹出背景选项,它将仅显示警告消息并覆盖屏幕。

Disable Concurrent Logins – This option will restrict your WordPress users from concurrent logins. This means they will not be able to use the same account to log in at the same time from different devices.

禁用并发登录 –此选项将限制您的WordPress用户并发登录。 这意味着他们将无法使用同一帐户同时从不同设备登录。

Enable Redirect – By default, the plugin displays a log in popup and does not redirect users. You can enable this option to redirect users to any other page you want.

启用重定向 –默认情况下,该插件显示弹出窗口中的日志,并且不重定向用户。 您可以启用此选项将用户重定向到所需的任何其他页面。

After you have reviewed and changed settings, don’t forget to click on the ‘Save settings’ button to store your changes.

查看并更改设置后,请不要忘记单击“保存设置”按钮来存储您的更改。

Setting up different timeout settings based on user roles

根据用户角色设置不同的超时设置

If you want to set timeout rules based on user roles and capabilities, then you can do so under the ‘Advanced Management’ tab on the plugin’s settings page.

如果要基于用户角色和功能设置超时规则,则可以在插件设置页面的“高级管理”选项卡下进行设置。

First, you need to select the user roles that you want to set up differently than global settings. After that, you will be able to select timeout in minutes, redirects, or even disable timeout settings for that user role.

首先,您需要选择要与全局设置不同设置的用户角色。 之后,您将能够选择以分钟为单位的超时,重定向,甚至禁用该用户角色的超时设置。

Multi-role idle user timeout settings

Once you are satisfied with the settings, click on the ‘Save settings’ button to save your changes.

对设置满意后,单击“保存设置”按钮以保存您的更改。

To see the plugin in action, you can login to your website and do nothing for the time duration that you have set in plugin settings. After that, you will see a countdown timer popup appear.

要查看该插件的运行情况,您可以登录到您的网站,并且在插件设置中设置的持续时间内不执行任何操作。 之后,您会看到一个倒数计时器弹出窗口。

Timeout countdown

You can click on the continue button to resume working without expiring the session.

您可以单击继续按钮以继续工作而不会终止会话。

Users who don’t click on the continue button will be logged out and they will see the login screen.

未单击继续按钮的用户将被注销,并看到登录屏幕。

Login popup
两步身份验证可提高安全性 (Add More Security with Two Step Authentication)

Now one problem with this approach is that many users save their passwords using a password manager or their browser’s built-in password storage feature.

现在,这种方法的问题是许多用户使用密码管理器或浏览器的内置密码存储功能来保存密码。

This means that their login popup will already have their username and password fields filled in. Any person can just click on the login button to access their account while they are away.

这意味着他们的登录弹出窗口将已经填写了用户名和密码字段。任何人都可以在不在时单击登录按钮来访问其帐户。

Login fields already filled in

You can make unauthorized access more difficult by adding two-step verification to the WordPress login screen.

通过在WordPress登录屏幕上添加两步验证,可以使未经授权的访问更加困难。

It basically requires users to enter a unique one-time password generated by an app on their phone. For detailed instructions, see our guide on how to add two-factor authentication in WordPress.

它基本上要求用户输入由手机上的应用程序生成的唯一的一次性密码。 有关详细说明,请参阅有关如何在WordPress中添加两因素身份验证的指南。

We hope this article helped you learn how to automatically log out idle users in WordPress. You may also want to see our ultimate WordPress security guide for more tips on securing your WordPress website.

我们希望本文能帮助您学习如何在WordPress中自动注销空闲用户。 您可能还想查看我们的最终WordPress安全指南 ,以获取有关保护WordPress网站的更多提示。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-automatically-log-out-idle-users-in-wordpress/

wordpress注销

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值