mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
Merge branch 'develop' into activitypub
This commit is contained in:
@@ -294,3 +294,15 @@ usersController.getCSV = async function (req, res, next) {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
usersController.customFields = async function (req, res) {
|
||||
const keys = await db.getSortedSetRange('user-custom-fields', 0, -1);
|
||||
const fields = (await db.getObjects(keys.map(k => `user-custom-field:${k}`))).filter(Boolean);
|
||||
fields.forEach((field) => {
|
||||
if (field['select-options']) {
|
||||
field.selectOptionsFormatted = field['select-options'].trim().split('\n').join(', ');
|
||||
}
|
||||
field['min:rep'] = field['min:rep'] || 0;
|
||||
});
|
||||
res.render('admin/manage/users/custom-fields', { fields: fields });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user