diff --git a/public/language/en-GB/global.json b/public/language/en-GB/global.json index 5e57d09003..a90489ed2d 100644 --- a/public/language/en-GB/global.json +++ b/public/language/en-GB/global.json @@ -87,6 +87,7 @@ "reputation": "Reputation", "lastpost": "Last post", "firstpost": "First post", + "about": "About", "read_more": "read more", "more": "More", diff --git a/public/language/en-GB/user.json b/public/language/en-GB/user.json index c6029f9bda..63f4a3d933 100644 --- a/public/language/en-GB/user.json +++ b/public/language/en-GB/user.json @@ -45,6 +45,7 @@ "followers": "Followers", "following": "Following", "blocks": "Blocks", + "blocked-users": "Blocked users", "block_toggle": "Toggle Block", "block_user": "Block User", "unblock_user": "Unblock User", diff --git a/src/controllers/accounts/helpers.js b/src/controllers/accounts/helpers.js index f6bfa0e309..a0c0a0608c 100644 --- a/src/controllers/accounts/helpers.js +++ b/src/controllers/accounts/helpers.js @@ -78,6 +78,8 @@ helpers.getUserDataByUserSlug = async function (userslug, callerUID, query = {}) userData.hasPrivateChat = results.hasPrivateChat; userData.showHidden = results.canEdit; // remove in v1.19.0 userData.groups = Array.isArray(results.groups) && results.groups.length ? results.groups[0] : []; + userData.selectedGroup = userData.groups.filter(group => group && userData.groupTitleArray.includes(group.name)) + .sort((a, b) => userData.groupTitleArray.indexOf(a.name) - userData.groupTitleArray.indexOf(b.name)); userData.disableSignatures = meta.config.disableSignatures === 1; userData['reputation:disabled'] = meta.config['reputation:disabled'] === 1; userData['downvote:disabled'] = meta.config['downvote:disabled'] === 1; diff --git a/src/controllers/accounts/profile.js b/src/controllers/accounts/profile.js index 8b049b8e34..0401f5b31e 100644 --- a/src/controllers/accounts/profile.js +++ b/src/controllers/accounts/profile.js @@ -61,9 +61,6 @@ profileController.get = async function (req, res, next) { addMetaTags(res, userData); - userData.selectedGroup = userData.groups.filter(group => group && userData.groupTitleArray.includes(group.name)) - .sort((a, b) => userData.groupTitleArray.indexOf(a.name) - userData.groupTitleArray.indexOf(b.name)); - res.render('account/profile', userData); };