dont filter banned when searching if user is admin

v1.18.x
Baris Usakli 12 years ago
parent 2e6b37e018
commit 9ad82f4907

@ -720,9 +720,13 @@ 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) {
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);
}

Loading…
Cancel
Save