summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-14 23:14:55 -0500
committerUnknwon <u@gogs.io>2016-02-14 23:14:55 -0500
commit58e004f7da58eaa8c461e34cc2fbbb9727f6fa33 (patch)
treed2b16690a4d19917530fe522271f3121683eb074 /models/user.go
parentfd92d91da3212f609ed6266fed7ac4b9f238f771 (diff)
downloadgitea-58e004f7da58eaa8c461e34cc2fbbb9727f6fa33.tar.gz
gitea-58e004f7da58eaa8c461e34cc2fbbb9727f6fa33.zip
Remove cache avatar support and add its tests
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/models/user.go b/models/user.go
index 09ad74d76d..7a8817591c 100644
--- a/models/user.go
+++ b/models/user.go
@@ -247,8 +247,6 @@ func (u *User) RelAvatarLink() string {
}
return "/avatars/" + com.ToStr(u.Id)
- case setting.Service.EnableCacheAvatar:
- return "/avatar/" + u.Avatar
}
return setting.GravatarSource + u.Avatar
}
@@ -493,7 +491,7 @@ func CreateUser(u *User) (err error) {
u.LowerName = strings.ToLower(u.Name)
u.AvatarEmail = u.Email
- u.Avatar = avatar.HashEmail(u.AvatarEmail)
+ u.Avatar = base.HashEmail(u.AvatarEmail)
u.Rands = GetUserSalt()
u.Salt = GetUserSalt()
u.EncodePasswd()
@@ -628,7 +626,7 @@ func updateUser(e Engine, u *User) error {
if len(u.AvatarEmail) == 0 {
u.AvatarEmail = u.Email
}
- u.Avatar = avatar.HashEmail(u.AvatarEmail)
+ u.Avatar = base.HashEmail(u.AvatarEmail)
}
u.LowerName = strings.ToLower(u.Name)