mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
closes #1346
This commit is contained in:
@@ -173,6 +173,10 @@ Sockets.init = function(server) {
|
||||
|
||||
Sockets.logoutUser = function(uid) {
|
||||
Sockets.getUserSockets(uid).forEach(function(socket) {
|
||||
if (socket.handshake && socket.handshake.signedCookies && socket.handshake.signedCookies['express.sid']) {
|
||||
db.sessionStore.destroy(socket.handshake.signedCookies['express.sid']);
|
||||
}
|
||||
|
||||
socket.emit('event:disconnect');
|
||||
socket.disconnect();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user