diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-01 21:30:04 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-01 21:30:04 -0400 |
commit | e7d8fadb083451c632af43de862eab88adb5b29a (patch) | |
tree | 25e4b39d2c43edcd3aa0b2686c4fede2264c236a /models/user.go | |
parent | 3bd5fc6d6f5e1a04acf93929808f982417031e2e (diff) | |
download | gitea-e7d8fadb083451c632af43de862eab88adb5b29a.tar.gz gitea-e7d8fadb083451c632af43de862eab88adb5b29a.zip |
Add disable gravatar option
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go index e340eed441..27140cf1c1 100644 --- a/models/user.go +++ b/models/user.go @@ -74,7 +74,9 @@ func (user *User) HomeLink() string { // AvatarLink returns the user gravatar link. func (user *User) AvatarLink() string { - if base.Service.EnableCacheAvatar { + if base.DisableGravatar { + return "/img/avatar_default.jpg" + } else if base.Service.EnableCacheAvatar { return "/avatar/" + user.Avatar } return "//1.gravatar.com/avatar/" + user.Avatar |