diff options
author | Paweł Bogusławski <pawel.boguslawski@ib.pl> | 2020-10-23 19:55:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-23 20:55:10 +0300 |
commit | d2ad4dec63cb3ee94b5ba997aa2e2514abc53096 (patch) | |
tree | 5c1c9fa0cd054790b7a23f17bcaad34899417e49 /models/user.go | |
parent | e4d953354378d7ed5de6127e5133f22dff1d5fae (diff) | |
download | gitea-d2ad4dec63cb3ee94b5ba997aa2e2514abc53096.tar.gz gitea-d2ad4dec63cb3ee94b5ba997aa2e2514abc53096.zip |
Avatar autogeneration fixed (#13233)
This mod fixes problem with initial avatar autogeneration and
avatar autogneration after deleting previous avatar.
Related: https://github.com/go-gitea/gitea/issues/13159
Fixes: 80a6b0f5bce15a641fc75f5f1ef6e42ef54424bc
Author-Change-Id: IB#1105243
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/models/user.go b/models/user.go index 2e38502c5b..42f70b4666 100644 --- a/models/user.go +++ b/models/user.go @@ -190,9 +190,6 @@ func (u *User) BeforeUpdate() { if len(u.AvatarEmail) == 0 { u.AvatarEmail = u.Email } - if len(u.AvatarEmail) > 0 && u.Avatar == "" { - u.Avatar = base.HashEmail(u.AvatarEmail) - } } u.LowerName = strings.ToLower(u.Name) @@ -822,7 +819,6 @@ func CreateUser(u *User) (err error) { u.LowerName = strings.ToLower(u.Name) u.AvatarEmail = u.Email - u.Avatar = base.HashEmail(u.AvatarEmail) if u.Rands, err = GetUserSalt(); err != nil { return err } |