Node.js based forum software built for the modern web
fix: #8230, add hook getUserDataByUserSlug
Barış Soner Uşaklı0d1b5a7fb1dc
diff --git a/src/controllers/accounts/helpers.js b/src/controllers/accounts/helpers.jsindex 7a646651ac..b868b8aa56 100644--- a/src/controllers/accounts/helpers.js+++ b/src/controllers/accounts/helpers.js@@ -113,8 +113,8 @@ helpers.getUserDataByUserSlug = async function (userslug, callerUID) {userData['cover:position'] = validator.escape(String(userData['cover:position'] || '50% 50%'));userData['username:disableEdit'] = !userData.isAdmin && meta.config['username:disableEdit'];userData['email:disableEdit'] = !userData.isAdmin && meta.config['email:disableEdit'];-- return userData;+ const hookData = await plugins.fireHook('filters:helpers.getUserDataByUserSlug', { userData: userData, callerUID: callerUID });+ return hookData.userData;};async function getAllData(uid, callerUID) {