mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 23:52:58 +01:00
closes #6672
This commit is contained in:
@@ -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.",
|
||||
|
||||
@@ -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'] = '?';
|
||||
|
||||
Reference in New Issue
Block a user