mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
feat: pass req.query to getUserDataByUserSlug
This commit is contained in:
@@ -16,7 +16,7 @@ const categories = require('../../categories');
|
||||
|
||||
const helpers = module.exports;
|
||||
|
||||
helpers.getUserDataByUserSlug = async function (userslug, callerUID) {
|
||||
helpers.getUserDataByUserSlug = async function (userslug, callerUID, query = {}) {
|
||||
const uid = await user.getUidByUserslug(userslug);
|
||||
if (!uid) {
|
||||
return null;
|
||||
@@ -114,7 +114,11 @@ helpers.getUserDataByUserSlug = async function (userslug, callerUID) {
|
||||
|
||||
await getCounts(userData, callerUID);
|
||||
|
||||
const hookData = await plugins.hooks.fire('filter:helpers.getUserDataByUserSlug', { userData: userData, callerUID: callerUID });
|
||||
const hookData = await plugins.hooks.fire('filter:helpers.getUserDataByUserSlug', {
|
||||
userData: userData,
|
||||
callerUID: callerUID,
|
||||
query: query,
|
||||
});
|
||||
return hookData.userData;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user