forked from forgejo/forgejo
Replace -1 with GhostUserID (#27703)
This commit is contained in:
parent
eb1478791f
commit
881806a50b
7 changed files with 18 additions and 13 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue