|
|
@ -45,6 +45,9 @@ func toUser(user *models.User, signed, authed bool) *api.User { |
|
|
|
AvatarURL: user.AvatarLink(), |
|
|
|
AvatarURL: user.AvatarLink(), |
|
|
|
Created: user.CreatedUnix.AsTime(), |
|
|
|
Created: user.CreatedUnix.AsTime(), |
|
|
|
Restricted: user.IsRestricted, |
|
|
|
Restricted: user.IsRestricted, |
|
|
|
|
|
|
|
Location: user.Location, |
|
|
|
|
|
|
|
Website: user.Website, |
|
|
|
|
|
|
|
Description: user.Description, |
|
|
|
} |
|
|
|
} |
|
|
|
// hide primary email if API caller is anonymous or user keep email private
|
|
|
|
// hide primary email if API caller is anonymous or user keep email private
|
|
|
|
if signed && (!user.KeepEmailPrivate || authed) { |
|
|
|
if signed && (!user.KeepEmailPrivate || authed) { |
|
|
|