summaryrefslogtreecommitdiffstats
path: root/models/user/avatar.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user/avatar.go')
-rw-r--r--models/user/avatar.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/models/user/avatar.go b/models/user/avatar.go
index f73ac56c5e..102206f3a2 100644
--- a/models/user/avatar.go
+++ b/models/user/avatar.go
@@ -68,11 +68,9 @@ func (u *User) AvatarLinkWithSize(size int) string {
useLocalAvatar := false
autoGenerateAvatar := false
- var disableGravatar bool
disableGravatarSetting, _ := system_model.GetSetting(system_model.KeyPictureDisableGravatar)
- if disableGravatarSetting != nil {
- disableGravatar = disableGravatarSetting.GetValueBool()
- }
+
+ disableGravatar := disableGravatarSetting.GetValueBool()
switch {
case u.UseCustomAvatar: