check error fix ip

v1.18.x
barisusakli 10 years ago
parent aa577f4adc
commit addd6ecde7

@ -445,6 +445,10 @@ SocketUser.loadPage = function(socket, data, callback) {
callback(null, userData);
}
if (!data || !data.page) {
return callback(new Error('[[error:invalid-data]]'));
}
var controllers = require('../controllers/users');
var pagination = require('../pagination');
var set = '';

@ -16,7 +16,7 @@ module.exports = function(User) {
var uid = data.uid || 0;
var paginate = data.hasOwnProperty('paginate') ? data.paginate : true;
if (searchBy.indexOf('ip') !== -1) {
if (searchBy === 'ip') {
return searchByIP(query, uid, callback);
}

Loading…
Cancel
Save