mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-03 22:30:58 +01:00
closes #6883
This commit is contained in:
@@ -111,5 +111,6 @@
|
||||
"hsts-preload": 0,
|
||||
"hsts-enabled": 0,
|
||||
"eventLoopLagThreshold": 100,
|
||||
"eventLoopInterval": 500
|
||||
"eventLoopInterval": 500,
|
||||
"onlineCutoff": 30
|
||||
}
|
||||
@@ -27,6 +27,8 @@
|
||||
"lockout-duration": "Account Lockout Duration (minutes)",
|
||||
"login-days": "Days to remember user login sessions",
|
||||
"password-expiry-days": "Force password reset after a set number of days",
|
||||
"online-cutoff": "Minutes after user is considered inactive",
|
||||
"online-cutoff-help": "If user performs no actions for this duration, they are considered inactive and they do not receive realtime updates.",
|
||||
"registration": "User Registration",
|
||||
"registration-type": "Registration Type",
|
||||
"registration-type.normal": "Normal",
|
||||
|
||||
@@ -43,7 +43,7 @@ User.getUidsFromSet = function (set, start, stop, callback) {
|
||||
if (set === 'users:online') {
|
||||
var count = parseInt(stop, 10) === -1 ? stop : stop - start + 1;
|
||||
var now = Date.now();
|
||||
db.getSortedSetRevRangeByScore(set, start, count, '+inf', now - 300000, callback);
|
||||
db.getSortedSetRevRangeByScore(set, start, count, '+inf', now - (meta.config.onlineCutoff * 60000), callback);
|
||||
} else {
|
||||
db.getSortedSetRevRange(set, start, stop, callback);
|
||||
}
|
||||
|
||||
@@ -144,6 +144,9 @@
|
||||
<input type="text" class="form-control" data-field="loginSeconds" placeholder="Seconds" />
|
||||
<p class="help-block">Note that only one of these values will be used. If there is no <i>seconds</i> value we fall back to <i>days</i>. If
|
||||
there is no <i>days</i> value we default to <i>14 days</i>.</p>
|
||||
<label>[[admin/settings/user:online-cutoff]]</label>
|
||||
<input type="text" class="form-control" data-field="onlineCutoff">
|
||||
<p class="help-block">[[admin/settings/user:online-cutoff-help]]</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user