mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-13 18:17:42 +01:00
test: dont return cover:url if its not requested
This commit is contained in:
@@ -267,10 +267,11 @@ module.exports = function (User) {
|
||||
user.picture = user.uploadedpicture;
|
||||
}
|
||||
}
|
||||
|
||||
user['cover:url'] = user['cover:url'] ?
|
||||
prependRelativePath(user['cover:url']) :
|
||||
coverPhoto.getDefaultProfileCover(user.uid);
|
||||
if (user.hasOwnProperty('cover:url')) {
|
||||
user['cover:url'] = user['cover:url'] ?
|
||||
prependRelativePath(user['cover:url']) :
|
||||
coverPhoto.getDefaultProfileCover(user.uid);
|
||||
}
|
||||
|
||||
if (meta.config.defaultAvatar && !user.picture) {
|
||||
user.picture = User.getDefaultAvatar();
|
||||
|
||||
Reference in New Issue
Block a user