mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
test: fix test only set for spiders
This commit is contained in:
@@ -120,8 +120,9 @@ module.exports = function (User) {
|
|||||||
user.username = (user.hasOwnProperty('oldUid') && parseInt(user.oldUid, 10)) ? '[[global:former-user]]' : '[[global:guest]]';
|
user.username = (user.hasOwnProperty('oldUid') && parseInt(user.oldUid, 10)) ? '[[global:former-user]]' : '[[global:guest]]';
|
||||||
user.displayname = user.username;
|
user.displayname = user.username;
|
||||||
}
|
}
|
||||||
user.uid = uid;
|
if (uid === -1) { // if loading spider set uid to -1 otherwise spiders have uid = 0 like guests
|
||||||
|
user.uid = -1;
|
||||||
|
}
|
||||||
return user;
|
return user;
|
||||||
});
|
});
|
||||||
return users;
|
return users;
|
||||||
|
|||||||
Reference in New Issue
Block a user