|
|
|
@ -47,7 +47,7 @@ module.exports = function(SocketPosts) {
|
|
|
|
|
privileges.categories.isAdminOrMod(post.topic.cid, socket.uid, next);
|
|
|
|
|
},
|
|
|
|
|
userData: function(next) {
|
|
|
|
|
user.getUserFields(socket.uid, ['username', 'reputation'], next);
|
|
|
|
|
user.getUserFields(socket.uid, ['username', 'reputation', 'banned'], next);
|
|
|
|
|
}
|
|
|
|
|
}, next);
|
|
|
|
|
},
|
|
|
|
@ -56,6 +56,10 @@ module.exports = function(SocketPosts) {
|
|
|
|
|
return next(new Error('[[error:not-enough-reputation-to-flag]]'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (parseInt(user.banned, 10) === 1) {
|
|
|
|
|
return next(new Error('[[error:user-banned]]'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
flaggingUser = user.userData;
|
|
|
|
|
flaggingUser.uid = socket.uid;
|
|
|
|
|
|
|
|
|
|