This commit is contained in:
Julian Lam
2018-07-26 14:36:25 -04:00
parent 5243ee559a
commit 7dfe953526
2 changed files with 7 additions and 1 deletions

View File

@@ -108,6 +108,7 @@
"guest": "Guest",
"guests": "Guests",
"former_user": "A Former User",
"updated.title": "Forum Updated",
"updated.message": "This forum has just been updated to the latest version. Click here to refresh the page.",

View File

@@ -119,6 +119,11 @@ module.exports = function (User) {
return memo;
}, {});
var users = uids.map(function (uid) {
const returnPayload = usersData[ref[uid]];
if (uid > 0 && !returnPayload.uid) {
returnPayload.oldUid = parseInt(uid, 10);
}
return usersData[ref[uid]];
});
return users;
@@ -144,7 +149,7 @@ module.exports = function (User) {
if (!parseInt(user.uid, 10)) {
user.uid = 0;
user.username = '[[global:guest]]';
user.username = (user.hasOwnProperty('oldUid') && parseInt(user.oldUid, 10)) ? '[[global:former_user]]' : '[[global:guest]]';
user.userslug = '';
user.picture = User.getDefaultAvatar();
user['icon:text'] = '?';