mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7517
This commit is contained in:
@@ -389,6 +389,9 @@ authenticationController.onSuccessfulLogin = function (req, uid, callback) {
|
||||
function (next) {
|
||||
user.updateLastOnlineTime(uid, next);
|
||||
},
|
||||
function (next) {
|
||||
user.updateOnlineUsers(uid, next);
|
||||
}
|
||||
], function (err) {
|
||||
next(err);
|
||||
});
|
||||
@@ -498,7 +501,7 @@ authenticationController.logout = function (req, res, next) {
|
||||
user.setUserField(uid, 'lastonline', Date.now() - (meta.config.onlineCutoff * 60000), next);
|
||||
},
|
||||
function (next) {
|
||||
db.sortedSetRemove('users:online', uid, next);
|
||||
db.sortedSetAdd('users:online', Date.now() - (meta.config.onlineCutoff * 60000), uid, next);
|
||||
},
|
||||
function (next) {
|
||||
plugins.fireHook('static:user.loggedOut', { req: req, res: res, uid: uid, sessionID: sessionID }, next);
|
||||
|
||||
Reference in New Issue
Block a user