mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 15:47:15 +02:00
removed event:disconnect
This commit is contained in:
@@ -30,7 +30,6 @@ authenticationController.register = function(req, res, next) {
|
||||
}
|
||||
}
|
||||
|
||||
var uid;
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
if (registrationType === 'invite-only') {
|
||||
@@ -255,7 +254,6 @@ authenticationController.localLogin = function(req, username, password, next) {
|
||||
authenticationController.logout = function(req, res, next) {
|
||||
if (req.user && parseInt(req.user.uid, 10) > 0 && req.sessionID) {
|
||||
var uid = parseInt(req.user.uid, 10);
|
||||
require('../socket.io').logoutUser(req.user.uid);
|
||||
db.sessionStore.destroy(req.sessionID, function(err) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
|
||||
@@ -88,7 +88,6 @@ User.banUser = function(uid, callback) {
|
||||
|
||||
websockets.in('uid_' + uid).emit('event:banned');
|
||||
|
||||
websockets.logoutUser(uid);
|
||||
callback();
|
||||
});
|
||||
});
|
||||
@@ -193,7 +192,6 @@ User.deleteUsers = function(socket, uids, callback) {
|
||||
ip: socket.ip
|
||||
});
|
||||
|
||||
websockets.logoutUser(uid);
|
||||
next();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -206,10 +206,6 @@ function callMethod(method, socket, params, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
Sockets.logoutUser = function(uid) {
|
||||
io.in('uid_' + uid).emit('event:disconnect');
|
||||
};
|
||||
|
||||
Sockets.in = function(room) {
|
||||
return io.in(room);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user