mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-23 00:40:23 +01:00
guest fixes
This commit is contained in:
@@ -199,7 +199,7 @@ module.exports = function(app, middleware) {
|
||||
app.use(relativePath, pluginRouter);
|
||||
app.use(relativePath, pageRouter);
|
||||
app.use(relativePath, authRouter);
|
||||
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
require('./debug')(app, middleware, controllers);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ var async = require('async'),
|
||||
return array.map(function(topic) {
|
||||
return topic && topic[field];
|
||||
}).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)) {
|
||||
user.uid = 0;
|
||||
user.username = '[[global:guest]]';
|
||||
user.userslug = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user