mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Replace -1 with GhostUserID (#27703)
This commit is contained in:
@@ -58,8 +58,7 @@ func GenerateRandomAvatar(ctx context.Context, u *User) error {
|
||||
|
||||
// AvatarLinkWithSize returns a link to the user's avatar with size. size <= 0 means default size
|
||||
func (u *User) AvatarLinkWithSize(ctx context.Context, size int) string {
|
||||
if u.ID == -1 {
|
||||
// ghost user
|
||||
if u.IsGhost() {
|
||||
return avatars.DefaultAvatarLink()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user