Node.js based forum software built for the modern web
feat: fix blocksCount not being returned on user profile
Barış Soner Uşaklıbd228d5ee744
diff --git a/public/src/client/account/blocks.js b/public/src/client/account/blocks.jsindex a6dd7978cd..3e76ceb620 100644--- a/public/src/client/account/blocks.js+++ b/public/src/client/account/blocks.js@@ -50,6 +50,7 @@ define('forum/account/blocks', ['forum/account/header'], function (header) {$('#users-container').html(html);$('#users-container').siblings('div.alert')[html.length ? 'hide' : 'show']();});+ $(window).trigger('action:user.blocks.toggle', { data: payload });}).fail(function () {ajaxify.go(ajaxify.currentPage);diff --git a/src/user/data.js b/src/user/data.jsindex 400d8ef472..ef48266b17 100644--- a/src/user/data.js+++ b/src/user/data.js@@ -11,8 +11,9 @@ const utils = require('../utils');const intFields = ['uid', 'postcount', 'topiccount', 'reputation', 'profileviews',- 'banned', 'banned:expire', 'email:confirmed', 'joindate', 'lastonline', 'lastqueuetime',- 'lastposttime', 'followingCount', 'followerCount', 'passwordExpiry',+ 'banned', 'banned:expire', 'email:confirmed', 'joindate', 'lastonline',+ 'lastqueuetime', 'lastposttime', 'followingCount', 'followerCount',+ 'blocksCount', 'passwordExpiry',];module.exports = function (User) {@@ -27,8 +28,8 @@ module.exports = function (User) {'lastonline', 'picture', 'fullname', 'location', 'birthday', 'website','aboutme', 'signature', 'uploadedpicture', 'profileviews', 'reputation','postcount', 'topiccount', 'lastposttime', 'banned', 'banned:expire',- 'status', 'flags', 'followerCount', 'followingCount', 'cover:url',- 'cover:position', 'groupTitle',+ 'status', 'flags', 'followerCount', 'followingCount', 'blocksCount',+ 'cover:url', 'cover:position', 'groupTitle',];User.guestData = {