This page is a translated version of the page Extension:LoginNotify and the translation is 44% complete.
Outdated translations are marked like this.
此扩展随附于MediaWiki 1.40及更高版本。 因此您无需另外下载。 但是,您仍需遵循此页面提供的其他使用说明。
发行状态: 穩定版
实现 用户活动
描述 通知用户有可疑登录
作者 Brian Wolff (Bawolff讨论)
最新版本 0.1
MediaWiki >= 1.41
Composer mediawiki/loginnotify
许可协议 MIT授權條款
  • $wgLoginNotifySeenBucketSize
  • $wgLoginNotifyExpiryNewIP
  • $wgLoginNotifyExpiryKnownIP
  • $wgLoginNotifyEnableOnSuccess
  • $wgLoginNotifyUseSeenTable
  • $wgLoginNotifyAttemptsKnownIP
  • $wgLoginNotifyCacheLoginIPExpiry
  • $wgLoginNotifyCookieExpire
  • $wgLoginNotifyUseCentralId
  • $wgLoginNotifyCookieDomain
  • $wgLoginNotifyUseCheckUser
  • $wgLoginNotifySeenExpiry
  • $wgLoginNotifyMaxCookieRecords
  • $wgLoginNotifyAttemptsNewIP
  • $wgLoginNotifyCheckKnownIPs
  • $wgLoginNotifySecretKey
季度下載量 36 (Ranked 127th)
正在使用的公开wiki数 904 (Ranked 277th)
問題 开启的任务 · 报告错误

The LoginNotify extension notifies you when someone logs into your account. It can be configured to give warnings after a certain number of failed login attempts (The number is configurable, and can be different between unknown IPs/devices and known IPs/devices). It can also give 扩展:Echo notices (which can also be emailed) for successful logins from IPs you don't normally use. It can optionally integrate into the CheckUser extension in order to determine if the login is from an IP address you don't normally use. It can also set a cookie to try and determine if the login is from a device you normally use.



This extension can optionally integrate with the CheckUser extension if it is installed, but does not require it.


Once LoginNotify is installed, whenever a user logs into the wiki, their IP subnet is cached on the server and a cookie named loginnotify_prevlogins is stored in their browser. These tokens, optionally along with CheckUser tables, are used to see if subsequent logins are coming from a known IP/device.

If CentralAuth and CheckUser are installed, it will check the IP not only for the current wiki, but also the ten wikis where the user is most active.



名称 描述 默认
$wgLoginNotifyAttemptsKnownIP 在触发通知之前,从已知IP允许的失败登录尝试次数。 10
$wgLoginNotifyAttemptsNewIP 触发通知之前,允许新IP的失败登录尝试次数。 3
$wgLoginNotifyExpiryKnownIP The time-to-live of the count of failed login attempts from a known IP (from the time of the first failed attempt). 604800 (7天)
$wgLoginNotifyExpiryNewIP The time-to-live of the count of failed login attempts from a new IP (from the time of the first failed attempt). 1209600 (14天)
$wgLoginNotifyCheckKnownIPs 是否在已知IP成功失败后触发通知。 true
$wgLoginNotifyEnableOnSuccess 是否在未知IP成功登录后触发通知。 true
$wgLoginNotifyEnableForPriv 为不同的用户组设置不同的默认通知首选项。 For user groups that have any of the user rights listed in this array, the preferences specified in Hooks:getOverridenOptions() are on by default. ("Failed login attempts" web notifications and "Login from new computer" web notifications.) [ "editinterface", "userrights" ]
$wgLoginNotifySecretKey Use this key instead of $wgSecretKey to generate the HMACs for the cookie. null
$wgLoginNotifyCookieExpire Cookie到期。 15552000 (180天)
$wgLoginNotifyCookieDomain To allow sharing login cookies between sites on different subdomains, set this to the parent domain name. null
$wgLoginNotifyMaxCookieRecords Maximum number of users (records) to track as having successfully logged in on a particular device. 6
$wgLoginNotifyCacheLoginIPExpiry How long to cache IPs in memcache. Set to false to disable; set to 0 to cache forever. 5184000 (60天)