aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/user.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go
index 88bbabe6d5..7fd7449ce5 100644
--- a/models/user.go
+++ b/models/user.go
@@ -72,7 +72,10 @@ func (user *User) HomeLink() string {
// AvatarLink returns the user gravatar link.
func (user *User) AvatarLink() string {
- return "/avatar/" + user.Avatar
+ if base.Service.EnableCacheAvatar {
+ return "/avatar/" + user.Avatar
+ }
+ return "http://1.gravatar.com/avatar/" + user.Avatar
}
// NewGitSig generates and returns the signature of given user.