From 9ad82f4907f42cf83d09a499550763794ad5b203 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Wed, 14 Aug 2013 14:26:09 -0400 Subject: [PATCH] dont filter banned when searching if user is admin --- src/websockets.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/websockets.js b/src/websockets.js index 723922ad23..c9b3f73a88 100644 --- a/src/websockets.js +++ b/src/websockets.js @@ -720,8 +720,12 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }), socket.on('api:admin.user.search', function(username) { if(uid && uid > 0) { user.search(username, function(data) { - data = user.filterBannedUsers(data); - socket.emit('api:admin.user.search', data); + user.isAdministrator(uid, function(isAdmin) { + if(!isAdmin) + data = user.filterBannedUsers(data); + + socket.emit('api:admin.user.search', data); + }); }); } else { socket.emit('api:admin.user.search', null);