diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-06-29 21:30:05 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-29 21:30:05 -0300 |
commit | 935b40fd8e5bbdc2a1ce1c64b72e1d3fcd9ba147 (patch) | |
tree | 33f57065b8a7e756683c6367ab292ba94c64fc2b /models | |
parent | 783b1967e257fdba2bd593d9f2108da2010b7448 (diff) | |
parent | 2b410e44b2813648d670feb2fd543638bd8a4c80 (diff) | |
download | gitea-935b40fd8e5bbdc2a1ce1c64b72e1d3fcd9ba147.tar.gz gitea-935b40fd8e5bbdc2a1ce1c64b72e1d3fcd9ba147.zip |
Merge pull request #2083 from ethantkoenig/check_err/org_avatar
Don't ignore gravatar error
Diffstat (limited to 'models')
-rw-r--r-- | models/user.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go index 6484c8cf69..2a4fb557db 100644 --- a/models/user.go +++ b/models/user.go @@ -333,15 +333,14 @@ func (u *User) generateRandomAvatar(e Engine) error { // which includes app sub-url as prefix. However, it is possible // to return full URL if user enables Gravatar-like service. func (u *User) RelAvatarLink() string { - defaultImgURL := setting.AppSubURL + "/img/avatar_default.png" if u.ID == -1 { - return defaultImgURL + return base.DefaultAvatarLink() } switch { case u.UseCustomAvatar: if !com.IsFile(u.CustomAvatarPath()) { - return defaultImgURL + return base.DefaultAvatarLink() } return setting.AppSubURL + "/avatars/" + u.Avatar case setting.DisableGravatar, setting.OfflineMode: |