mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-31 03:14:17 +09:00
Replace -1 with GhostUserID (#27703)
This commit is contained in:
1 parent
eb1478791f
commit
881806a50b
7 files changed
+18
-13
No files matched your search
@@ -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