Skip to content

Node.js based forum software built for the modern web

closes #3736

barisusakli36bfe30425d5
diff --git a/src/controllers/users.js b/src/controllers/users.js
index c4b7916502..bbe4e9da5d 100644
--- a/src/controllers/users.js
+++ b/src/controllers/users.js
@@ -59,6 +59,9 @@ usersController.getUsersSortedByPosts = function(req, res, next) {
};
usersController.getUsersSortedByReputation = function(req, res, next) {
+ if (parseInt(meta.config['reputation:disabled'], 10) === 1) {
+ return next();
+ }
usersController.getUsers('users:reputation', 0, 49, req, res, next);
};
@@ -218,6 +221,7 @@ usersController.getMap = function(req, res, next) {
res.render('usersMap', {
rooms: data,
+ 'reputation:disabled': parseInt(meta.config['reputation:disabled'], 10) === 1,
title: '[[pages:users/map]]',
breadcrumbs: helpers.buildBreadcrumbs([{text: '[[global:users]]', url: '/users'}, {text: '[[global:map]]'}])
});
@@ -231,6 +235,7 @@ function render(req, res, data, next) {
}
data.templateData.inviteOnly = meta.config.registrationType === 'invite-only';
+ data.templateData['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1;
res.render('users', data.templateData);
});
}