Skip to content

Node.js based forum software built for the modern web

dont join online_users and uid_ if user does not exist

Baris Usakli19ae2b3eb454
diff --git a/src/socket.io/index.js b/src/socket.io/index.js
index 228d4ca287..19a8b51f26 100644
--- a/src/socket.io/index.js
+++ b/src/socket.io/index.js
@@ -79,7 +79,7 @@ function onConnect(socket) {
if (err) {
return winston.error(err);
}
- if (socket.uid) {
+ if (socket.uid && exists) {
socket.join('uid_' + socket.uid);
socket.join('online_users');
} else {