mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
related to #1250
This commit is contained in:
@@ -4,6 +4,7 @@ var async = require('async'),
|
||||
user = require('../user'),
|
||||
topics = require('../topics'),
|
||||
utils = require('./../../public/src/utils'),
|
||||
meta = require('../meta'),
|
||||
SocketUser = {};
|
||||
|
||||
SocketUser.exists = function(socket, data, callback) {
|
||||
@@ -204,6 +205,10 @@ SocketUser.loadMore = function(socket, data, callback) {
|
||||
return callback(new Error('invalid-data'));
|
||||
}
|
||||
|
||||
if (!socket.uid && !!parseInt(meta.config.privateUserInfo, 10)) {
|
||||
return callback(new Error('not-allowed'));
|
||||
}
|
||||
|
||||
var start = data.after,
|
||||
end = start + 19;
|
||||
|
||||
@@ -231,7 +236,6 @@ SocketUser.loadMore = function(socket, data, callback) {
|
||||
};
|
||||
|
||||
|
||||
|
||||
SocketUser.setStatus = function(socket, status, callback) {
|
||||
var server = require('./index');
|
||||
user.setUserField(socket.uid, 'status', status, function(err) {
|
||||
|
||||
Reference in New Issue
Block a user