guest fixes

v1.18.x
barisusakli 10 years ago
parent e2707353e9
commit a19c306f49

@ -176,7 +176,7 @@ var async = require('async'),
return array.map(function(topic) { return array.map(function(topic) {
return topic && topic[field]; return topic && topic[field];
}).filter(function(value, index, array) { }).filter(function(value, index, array) {
return value && array.indexOf(value) === index; return utils.isNumber(value) && array.indexOf(value) === index;
}); });
} }

@ -109,6 +109,7 @@ var async = require('async'),
} }
if (!parseInt(user.uid, 10)) { if (!parseInt(user.uid, 10)) {
user.uid = 0;
user.username = '[[global:guest]]'; user.username = '[[global:guest]]';
user.userslug = ''; user.userslug = '';
} }

Loading…
Cancel
Save