summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-14 01:12:07 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-14 01:12:07 -0400
commit47edf7f4f9d359765764207cbcb6dd82dba36de8 (patch)
treea809ed1add57ce5eaae2d55190bb55abac294718 /models/user.go
parent495a52d78bfa25759ac4930ccf474206a562c219 (diff)
downloadgitea-47edf7f4f9d359765764207cbcb6dd82dba36de8.tar.gz
gitea-47edf7f4f9d359765764207cbcb6dd82dba36de8.zip
Finish update password and profile
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go
index 06db7d8ba2..8f7a37cba9 100644
--- a/models/user.go
+++ b/models/user.go
@@ -49,6 +49,7 @@ type User struct {
NumStars int
NumRepos int
Avatar string `xorm:"varchar(2048) not null"`
+ AvatarEmail string `xorm:"not null"`
Location string
Website string
Created time.Time `xorm:"created"`
@@ -106,6 +107,7 @@ func RegisterUser(user *User) (err error) {
user.LowerName = strings.ToLower(user.Name)
user.Avatar = base.EncodeMd5(user.Email)
+ user.AvatarEmail = user.Email
if err = user.EncodePasswd(); err != nil {
return err
}