diff --git a/src/socket.io/admin.js b/src/socket.io/admin.js index 7a47508a6a..0a84ddffa1 100644 --- a/src/socket.io/admin.js +++ b/src/socket.io/admin.js @@ -36,6 +36,9 @@ var async = require('async'), }; SocketAdmin.before = function(socket, method, next) { + if (!socket.uid) { + return; + } user.isAdministrator(socket.uid, function(err, isAdmin) { if (!err && isAdmin) { next();