diff options
author | Unknwon <u@gogs.io> | 2016-02-14 23:14:55 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-14 23:14:55 -0500 |
commit | 58e004f7da58eaa8c461e34cc2fbbb9727f6fa33 (patch) | |
tree | d2b16690a4d19917530fe522271f3121683eb074 /models/user.go | |
parent | fd92d91da3212f609ed6266fed7ac4b9f238f771 (diff) | |
download | gitea-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.go | 6 |
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) |