fix(inbox): more UN display fixes

This commit is contained in:
Sabe Jones
2018-11-01 17:41:27 -05:00
parent 6c71abfac8
commit 3922415314
5 changed files with 25 additions and 11 deletions

View File

@@ -220,7 +220,7 @@ schema.statics.transformJSONUser = function transformJSONUser (jsonUser, addComp
jsonUser.id = jsonUser._id;
// Remove username if not verified
if (!jsonUser.flags.verifiedUsername) delete jsonUser.auth.local.username;
if (!jsonUser.flags.verifiedUsername) jsonUser.auth.local.username = null;
if (addComputedStats) this.addComputedStatsToJSONObj(jsonUser.stats, jsonUser);
};