summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-01 21:30:04 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-01 21:30:04 -0400
commite7d8fadb083451c632af43de862eab88adb5b29a (patch)
tree25e4b39d2c43edcd3aa0b2686c4fede2264c236a /models/user.go
parent3bd5fc6d6f5e1a04acf93929808f982417031e2e (diff)
downloadgitea-e7d8fadb083451c632af43de862eab88adb5b29a.tar.gz
gitea-e7d8fadb083451c632af43de862eab88adb5b29a.zip
Add disable gravatar option
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go4
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