mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-21 20:02:03 +01:00
fix: remove intFields hack and update db.parseIntFields to only parseInt if field value is a number
This commit is contained in:
@@ -205,12 +205,7 @@ module.exports = function (User) {
|
||||
return;
|
||||
}
|
||||
|
||||
const _intFields = [...intFields];
|
||||
|
||||
if (activitypub.helpers.isUri(user.uid)) {
|
||||
_intFields.splice(_intFields.indexOf('uid'), 1);
|
||||
}
|
||||
db.parseIntFields(user, _intFields, requestedFields);
|
||||
db.parseIntFields(user, intFields, requestedFields);
|
||||
|
||||
if (user.hasOwnProperty('username')) {
|
||||
parseDisplayName(user, uidToSettings);
|
||||
|
||||
Reference in New Issue
Block a user