mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-24 11:38:27 +02:00
StatLog will now store for N days or N max/count items
This commit is contained in:
parent
9d46f23c66
commit
767bddcc4b
3 changed files with 58 additions and 17 deletions
|
@ -73,7 +73,8 @@ function userLogin(client, username, password, cb) {
|
|||
StatLog.incrementUserStat(user, 'login_count', 1, callback);
|
||||
},
|
||||
function recordLoginHistory(callback) {
|
||||
StatLog.appendSystemLogEntry('user_login_history', user.userId, 30, callback);
|
||||
const LOGIN_HISTORY_MAX = 200; // history of up to last 200 callers
|
||||
StatLog.appendSystemLogEntry('user_login_history', user.userId, LOGIN_HISTORY_MAX, StatLog.KeepType.Max, callback);
|
||||
}
|
||||
],
|
||||
function complete(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue