mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
refactor: shorter check for showfullname
This commit is contained in:
@@ -298,10 +298,9 @@ module.exports = function (User) {
|
|||||||
function parseDisplayName(user, uidToSettings) {
|
function parseDisplayName(user, uidToSettings) {
|
||||||
let showfullname = parseInt(meta.config.showfullname, 10) === 1;
|
let showfullname = parseInt(meta.config.showfullname, 10) === 1;
|
||||||
if (uidToSettings[user.uid]) {
|
if (uidToSettings[user.uid]) {
|
||||||
if (parseInt(uidToSettings[user.uid].showfullname, 10) === 0) {
|
const userSetting = parseInt(uidToSettings[user.uid].showfullname, 10);
|
||||||
showfullname = false;
|
if (userSetting === 0 || userSetting === 1) {
|
||||||
} else if (parseInt(uidToSettings[user.uid].showfullname, 10) === 1) {
|
showfullname = userSetting === 1;
|
||||||
showfullname = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user